From 3a1f04c49cf13f0740ec6f13f21209c6445fd4a6 Mon Sep 17 00:00:00 2001 From: "Chris St. Pierre" Date: Fri, 5 Aug 2011 10:17:10 -0400 Subject: fixed bcfg2-admin viz bug introduced by Popen fixes --- src/lib/Server/Admin/Viz.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/lib/Server/Admin') 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: -- cgit v1.2.3-1-g7c22