powertop2tuned: do not run powertop through shell
This commit is contained in:
parent
e25bd14690
commit
badb1211a1
1 changed files with 3 additions and 1 deletions
|
|
@ -183,7 +183,9 @@ class PowertopProfile:
|
|||
|
||||
def generateHTML(self):
|
||||
print "Running PowerTOP, please wait..."
|
||||
proc = Popen("LANG= powertop --html=/tmp/powertop --time=1", stdout=PIPE, stderr=PIPE, shell=True)
|
||||
environment = os.environ.copy()
|
||||
environment["LC_ALL"] = "C"
|
||||
proc = Popen("powertop --html=/tmp/powertop --time=1", stdout=PIPE, stderr=PIPE, env=environment)
|
||||
output = proc.communicate()[1]
|
||||
if proc.returncode != 0:
|
||||
return ret
|
||||
|
|
|
|||
Loading…
Reference in a new issue