summaryrefslogtreecommitdiffstats
path: root/src/lib/Server/Admin/Viz.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/Server/Admin/Viz.py')
-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: