summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris St. Pierre <chris.a.st.pierre@gmail.com>2011-08-05 10:17:16 -0400
committerChris St. Pierre <chris.a.st.pierre@gmail.com>2011-08-05 10:17:16 -0400
commit2ab42e12ee398ae34534baa9721b3a951a8f4121 (patch)
tree5c33627e9eaef7e703a9ca7097b78f191e25d4dd
parentdaae9eb16806e3cafdccbe1e3e316b880d276347 (diff)
parent3a1f04c49cf13f0740ec6f13f21209c6445fd4a6 (diff)
downloadbcfg2-2ab42e12ee398ae34534baa9721b3a951a8f4121.tar.gz
bcfg2-2ab42e12ee398ae34534baa9721b3a951a8f4121.tar.bz2
bcfg2-2ab42e12ee398ae34534baa9721b3a951a8f4121.zip
Merge branch 'work'
-rw-r--r--src/lib/Server/Admin/Viz.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/lib/Server/Admin/Viz.py b/src/lib/Server/Admin/Viz.py
index 9b1e78821..2d9b4ade2 100644
--- a/src/lib/Server/Admin/Viz.py
+++ b/src/lib/Server/Admin/Viz.py
@@ -1,7 +1,7 @@
import getopt
from subprocess import Popen, PIPE
import sys
-
+import pipes
import Bcfg2.Server.Admin
@@ -86,10 +86,11 @@ class Viz(Bcfg2.Server.Admin.MetadataCore):
else:
format = 'png'
- cmd = ["dot", "-T", format]
+ cmd = ["dot", "-T", pipes.quote(format)]
if output:
- cmd.extend(["-o", output])
- dotpipe = Popen(cmd, stdin=PIPE, stdout=PIPE, close_fds=True)
+ cmd.extend(["-o", pipes.quote(output)])
+ dotpipe = Popen(cmd,
+ shell=True, stdin=PIPE, stdout=PIPE, close_fds=True)
try:
dotpipe.stdin.write("digraph groups {\n")
except: