[Bug 1060192] Re: needless shell=True in a subprocess.Popen call
Launchpad Bug Tracker
1060192 at bugs.launchpad.net
Fri Feb 15 19:55:12 UTC 2013
This bug was fixed in the package software-properties - 0.92.14.1
---------------
software-properties (0.92.14.1) raring; urgency=low
* Build-depend on python-setuptools.
-- Matthias Klose <doko at ubuntu.com> Fri, 15 Feb 2013 20:01:57 +0100
** Changed in: software-properties (Ubuntu)
Status: In Progress => Fix Released
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to software-properties in Ubuntu.
https://bugs.launchpad.net/bugs/1060192
Title:
needless shell=True in a subprocess.Popen call
Status in “software-properties” package in Ubuntu:
Fix Released
Bug description:
Whilst there is no issue with the following use of subprocess.Popen
with shell=True today there is no reason to use it with shell=True in
this instance.
In softwareproperties/MirrorTest.py on line 29 (through to line 34) under the PingWorker the following code is found:
host = mirror.hostname
self.parent.report_action("Pinging %s..." % host)
commando = subprocess.Popen("ping -q -c 2 -W 1 -i 0.5 %s" % host,
shell=True, stdout=subprocess.PIPE,
stderr=subprocess.STDOUT).stdout
The code should be changed to something like the following:
commando = subprocess.Popen(["ping", "-q", "-c 2", "-W 1", "-i 0.5", host]
, stdout=subprocess.PIPE,
stderr=subprocess.STDOUT).stdout
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/software-properties/+bug/1060192/+subscriptions
More information about the foundations-bugs
mailing list