Bug 811053 - Stop using "shell=True" when invoking the subprocess module
Summary: Stop using "shell=True" when invoking the subprocess module
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: PulpDist
Classification: Community
Component: Pulp Plugins
Version: unspecified
Hardware: Unspecified
OS: Unspecified
urgent
urgent
Target Milestone: 0.1.0
Assignee: Nick Coghlan
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-04-10 00:58 UTC by Nick Coghlan
Modified: 2012-04-10 06:12 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-04-10 06:12:33 UTC


Attachments (Terms of Use)

Description Nick Coghlan 2012-04-10 00:58:08 UTC
To eliminate some early compatibility problems with the rsync invocation, the current subprocess invocation code relies on the system shell to parse the created rsync command line.

The test suite is now sufficiently comprehensive that this workaround should be eliminated - it was an acceptable quick fix to avoid stalling development, but needs to be eliminated before the code can be considered ready for deployment.

Comment 1 Nick Coghlan 2012-04-10 06:12:33 UTC
Fixed for 0.0.11

It turned out some arguments were already being manually quoted, which were then getting quoted *again* by the subprocess module when using "shell=False". This then confused rsync, which refused to run due to unrecognised filtering commands. Removing the manual quoting and relying entirely on the automatic quoting appears to have resolved the problem.


Note You need to log in before you can comment on or make changes to this bug.