1
0
Fork 0

Merge pull request #329 from yarda/powertop-typo-fix

powertop2tuned: work with PowerTOP 2.13 and newer
This commit is contained in:
Jaroslav Škarvada 2021-03-09 19:44:05 +01:00 committed by GitHub
commit 0c0ad33025
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -215,9 +215,12 @@ class PowertopProfile:
print('PowerTOP returned error code: %d' % proc.returncode, file=sys.stderr)
return -2
prefix = "PowerTOP outputing using base filename "
prefix = "PowerTOP outputting using base filename "
if output.find(prefix) == -1:
return -1
# workaround for PowerTOP older than 2.13
prefix = "PowerTOP outputing using base filename "
if output.find(prefix) == -1:
return -1
name = output[output.find(prefix)+len(prefix):-1]
#print "Parsed filename=", [name]