summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDieter Verfaillie <dieterv@optionexplicit.be>2012-11-12 17:18:41 +0100
committerColin Walters <walters@verbum.org>2012-11-12 11:54:07 -0500
commitabc95859d05edc9d167ef967652327091422b682 (patch)
tree4a996a2e6d36f1f021c0bdf72e3b98b4d35a6b70
parentdc453895c2df0b6d26a08885d156b363ffa5b921 (diff)
downloadgobject-introspection-abc95859d05edc9d167ef967652327091422b682.tar.gz
giscanner: unbreak g-ir-annotationtool...
... and by extension misc/update-glib-annotations.py. Commit 5c70ef2eb32949f8889e9ae654d50bfbf838951f broke these by assuming create_source_scanner() is always called with 'options' and 'args' built by the OptionParser() defined in scannermain.py's _get_option_parser(). This is not the case with g-ir-annotationtool, where annotationmain.py's annotation_main() creates it's own OptionParser() accepting a different set of 'options' and 'args' as compared to scannermain.py
-rwxr-xr-xgiscanner/scannermain.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/giscanner/scannermain.py b/giscanner/scannermain.py
index 6efd291a..45dcbcbd 100755
--- a/giscanner/scannermain.py
+++ b/giscanner/scannermain.py
@@ -348,7 +348,7 @@ def create_binary(transformer, options, args):
return shlibs
def create_source_scanner(options, args):
- if options.filelist:
+ if hasattr(options, 'filelist') and options.filelist:
filenames = extract_filelist(options)
else:
filenames = extract_filenames(args)
@@ -408,7 +408,7 @@ def scanner_main(args):
if options.test_codegen:
return test_codegen(options.test_codegen)
- if not options.filelist:
+ if hasattr(options, 'filelist') and not options.filelist:
if len(args) <= 1:
_error('Need at least one filename')