Correctly quote printed shell commands
authorJohan Dahlin <johan@gnome.org>
Fri, 9 Jul 2010 14:17:29 +0000 (11:17 -0300)
committerJohan Dahlin <johan@gnome.org>
Fri, 9 Jul 2010 14:18:09 +0000 (11:18 -0300)
giscanner/dumper.py

index 505465e..3b942a9 100644 (file)
@@ -173,7 +173,8 @@ class DumpCompiler(object):
                     "Could not find c source file: %s" % (source, ))
         args.extend(list(sources))
         if not self._options.quiet:
-            print "g-ir-scanner: compile: %r" % (' '.join(args), )
+            print "g-ir-scanner: compile: %s" % (
+                subprocess.list2cmdline(args),)
         subprocess.check_call(args)
 
     def _link(self, output, *sources):
@@ -231,7 +232,8 @@ class DumpCompiler(object):
         args.extend(list(sources))
 
         if not self._options.quiet:
-            print "g-ir-scanner: link: %r" % (' '.join(args), )
+            print "g-ir-scanner: link: %s" % (
+                subprocess.list2cmdline(args),)
         subprocess.check_call(args)