[scannermain] Add - as an alias for stdout
authorJohan Dahlin <johan@gnome.org>
Wed, 1 Sep 2010 23:53:08 +0000 (20:53 -0300)
committerJohan Dahlin <johan@gnome.org>
Wed, 1 Sep 2010 23:55:11 +0000 (20:55 -0300)
giscanner/scannermain.py

index fa9b6213dedb106b1f464d7baaab0ad940e7f1b1..587c661a9ef61bb0f8230204e970f362d7be9c78 100644 (file)
@@ -356,7 +356,7 @@ def scanner_main(args):
     writer = Writer(transformer.namespace, shlibs, transformer.get_includes(),
                     exported_packages, options.c_includes)
     data = writer.get_xml()
-    if options.output:
+    if options.output and options.output != "-":
         tempdir = os.path.dirname(options.output) or os.getcwd()
         main_f = tempfile.NamedTemporaryFile(suffix='.gir', dir=tempdir, delete=False)
         main_f.write(data)