summaryrefslogtreecommitdiffstats
path: root/src/lib/Bcfg2/Utils.py
diff options
context:
space:
mode:
authorChris St. Pierre <chris.a.st.pierre@gmail.com>2013-05-10 16:50:32 -0400
committerChris St. Pierre <chris.a.st.pierre@gmail.com>2013-05-10 16:52:38 -0400
commitd7280d986c8028d04009166e160d26ad3ae5c7e4 (patch)
treef44a2a182b5800f2d11333d9c582559e356dc380 /src/lib/Bcfg2/Utils.py
parent0887f4c929ba1354dd1fa78eccd1a7c5151a0ab7 (diff)
downloadbcfg2-d7280d986c8028d04009166e160d26ad3ae5c7e4.tar.gz
bcfg2-d7280d986c8028d04009166e160d26ad3ae5c7e4.tar.bz2
bcfg2-d7280d986c8028d04009166e160d26ad3ae5c7e4.zip
Executor: split commands given as strings
Diffstat (limited to 'src/lib/Bcfg2/Utils.py')
-rw-r--r--src/lib/Bcfg2/Utils.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/lib/Bcfg2/Utils.py b/src/lib/Bcfg2/Utils.py
index 581445bf4..1c2dceed2 100644
--- a/src/lib/Bcfg2/Utils.py
+++ b/src/lib/Bcfg2/Utils.py
@@ -2,6 +2,7 @@
used by both client and server. Stuff that doesn't fit anywhere
else. """
+import shlex
import fcntl
import logging
import threading
@@ -218,6 +219,7 @@ class Executor(object):
"""
if isinstance(command, str):
cmdstr = command
+ command = shlex.split(cmdstr)
else:
cmdstr = " ".join(command)
self.logger.debug("Running: %s" % cmdstr)