Skip to content
This repository has been archived by the owner on Dec 9, 2022. It is now read-only.
Permalink
Browse files Browse the repository at this point in the history
framework: Use subprocess.check_output() with a sequence of program a…
…rguments

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.
  • Loading branch information
bachradsusi committed Jun 21, 2016
1 parent e69378d commit dda55aa
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions framework/src/SetroubleshootFixit.py
Expand Up @@ -14,9 +14,9 @@ def __init__ (self, *p, **k):

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

if __name__ == "__main__":
mainloop = gobject.MainLoop ()
Expand Down

0 comments on commit dda55aa

Please sign in to comment.