Public bug reported:
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
** Affects: software-properties (Ubuntu)
Importance: Undecided
Status: New
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1060192
Title:
needless shell=True in a subprocess.Popen call
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/software-properties/+bug/1060192/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs