summaryrefslogtreecommitdiff
path: root/xcbgen/matcher.py
diff options
context:
space:
mode:
Diffstat (limited to 'xcbgen/matcher.py')
-rw-r--r--xcbgen/matcher.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/xcbgen/matcher.py b/xcbgen/matcher.py
index 6e45b23..bfa315e 100644
--- a/xcbgen/matcher.py
+++ b/xcbgen/matcher.py
@@ -18,10 +18,12 @@ def import_(node, module, namespace):
'''
# To avoid circular import error
from xcbgen import state
+ module.import_level = module.import_level + 1
new_file = join(namespace.dir, '%s.xml' % node.text)
new_root = parse(new_file).getroot()
new_namespace = state.Namespace(new_file)
execute(module, new_namespace)
+ module.import_level = module.import_level - 1
if not module.has_import(node.text):
module.add_import(node.text, new_namespace)