Index: command_wrapper.py |
=================================================================== |
--- command_wrapper.py (revision 109830) |
+++ command_wrapper.py (working copy) |
@@ -95,8 +95,15 @@ |
socket.setdefaulttimeout(10) |
command_id = uuid.uuid1() |
- cmd = ' '.join(args) |
+ # Ensure that args with spaces in them remain quoted. |
+ args_quoted = [] |
bradn
2011/11/19 01:09:13
Why not just requote it all?
|
+ for arg in args: |
+ if ' ' in arg: |
+ arg = '"' + arg + '"' |
+ args_quoted.append(arg) |
+ cmd = ' '.join(args_quoted) |
+ |
# Log that we're even starting. |
RunWithTimeout(LOG_TIMEOUT, LogCommand, |
options, command_id, -1, cmd, -1, '', '', 0) |