power-usage-report: misplaced flags in re.sub()
Bug #1683164 reported by
Jakub Wilk
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
fatrace |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
power-usage-report contains the following line:
lines = re.sub('\n{3,}', '\n\n', raw_out, re.S).splitlines()
But the 4th re.sub() argument is maximum number of substitutions, not flags.
Also, the regexp doesn't have any "." metacharacters, so the re.S flag
wouldn't have any effect. I guess it should be removed.
This bug was found using pydiatra:
http://
To post a comment you must log in.
Indeed, thank you! Fixed in master.