Don't fail if no --output option is specified
authorColin Walters <walters@verbum.org>
Thu, 11 Jun 2009 13:53:35 +0000 (09:53 -0400)
committerColin Walters <walters@verbum.org>
Thu, 11 Jun 2009 13:53:35 +0000 (09:53 -0400)
Printing to stdout is legitimate.

giscanner/dumper.py

index 8b85ae5..e6a8148 100644 (file)
@@ -91,7 +91,8 @@ class DumpCompiler(object):
     # Public API
 
     def run(self):
-        print '  GEN   ' + self._options.output
+        print '  GEN   ' + (self._options.output and
+                            self._options.output or '<stdout>')
         c_path = self._generate_tempfile('.c')
         f = open(c_path, 'w')
         f.write(_PROGRAM_TEMPLATE)