needless shell=True in a subprocess.Popen call

Bug #1060192 reported by David on 2012-10-02
This bug affects 1 person
Affects Status Importance Assigned to Milestone
software-properties (Ubuntu)
Robert Roth

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/ 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,

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,

Related branches

Robert Roth (evfool) on 2013-02-13
Changed in software-properties (Ubuntu):
status: New → Confirmed
importance: Undecided → Low
assignee: nobody → Robert Roth (evfool)
status: Confirmed → In Progress
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package software-properties -

software-properties ( raring; urgency=low

  * Build-depend on python-setuptools.
 -- Matthias Klose <email address hidden> Fri, 15 Feb 2013 20:01:57 +0100

Changed in software-properties (Ubuntu):
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers