summaryrefslogtreecommitdiffstats
path: root/src/lib/Server/Admin
diff options
context:
space:
mode:
authorChris St. Pierre <chris.a.st.pierre@gmail.com>2011-08-05 10:17:10 -0400
committerChris St. Pierre <chris.a.st.pierre@gmail.com>2011-08-05 10:17:10 -0400
commit3a1f04c49cf13f0740ec6f13f21209c6445fd4a6 (patch)
tree8b5ce920a6a4bb2e693c96cb91a35d4177e66ea9 /src/lib/Server/Admin
parentdb43746be3227e9342bc0ab870079ed3167eb324 (diff)
downloadbcfg2-3a1f04c49cf13f0740ec6f13f21209c6445fd4a6.tar.gz
bcfg2-3a1f04c49cf13f0740ec6f13f21209c6445fd4a6.tar.bz2
bcfg2-3a1f04c49cf13f0740ec6f13f21209c6445fd4a6.zip
fixed bcfg2-admin viz bug introduced by Popen fixes
Diffstat (limited to 'src/lib/Server/Admin')
-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: