Skip to content
This repository was archived by the owner on Dec 9, 2022. It is now read-only.

Commit dda55aa

Browse files
committed
framework: Use subprocess.check_output() with a sequence of program arguments
All subprocess.get*output() should be replaced with either subprocess.Popen or subprocess.check_output now. String args were converted to sequences of program arguments.
1 parent e69378d commit dda55aa

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Diff for: framework/src/SetroubleshootFixit.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ def __init__ (self, *p, **k):
1414

1515
@dbus.service.method ("org.fedoraproject.SetroubleshootFixit", in_signature='ss', out_signature='s')
1616
def run_fix(self, local_id, analysis_id):
17-
import commands
18-
command = "sealert -f %s -P %s" % ( local_id, analysis_id)
19-
return commands.getoutput(command)
17+
import subprocess
18+
command = ["sealert", "-f", local_id, "-P", analysis_id]
19+
return subprocess.check_output(command, universal_newlines=True)
2020

2121
if __name__ == "__main__":
2222
mainloop = gobject.MainLoop ()

0 commit comments

Comments
 (0)