summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rwxr-xr-xtools/g-ir-scanner7
1 files changed, 3 insertions, 4 deletions
diff --git a/tools/g-ir-scanner b/tools/g-ir-scanner
index 9fd16f18..353e985d 100755
--- a/tools/g-ir-scanner
+++ b/tools/g-ir-scanner
@@ -118,14 +118,13 @@ def main(args):
glibtransformer.parse(nodes)
if options.format == 'gir':
- from giscanner.girwriter import GIRWriter
- writer = GIRWriter(options.namespace, glibtransformer.get_nodes())
+ from giscanner.girwriter import GIRWriter as Writer
elif options.format == 'gidl':
- from giscanner.gidlwriter import GIDLWriter
- writer = GIDLWriter(options.namespace, glibtransformer.get_nodes())
+ from giscanner.gidlwriter import GIDLWriter as Writer
else:
raise SystemExit("Unknown format: %s" % (options.format,))
+ writer = Writer(options.namespace, glibtransformer.get_nodes())
data = writer.get_xml()
if options.output:
fd = open(options.output, "w")