From 0921f78660b7b0784ebe2fa586dd54551704699e Mon Sep 17 00:00:00 2001 From: Eitan Isaacson Date: Sat, 14 May 2011 21:38:45 -0400 Subject: Fix fix_gir.py to work with ginterfaces and to support delegates. --- tools/fix_gir.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'tools') diff --git a/tools/fix_gir.py b/tools/fix_gir.py index 31190e3..3e08489 100755 --- a/tools/fix_gir.py +++ b/tools/fix_gir.py @@ -14,7 +14,7 @@ def purge_white_space_and_fix_namespace(node, indent=0): purge_white_space_and_fix_namespace(child, indent+1) def find_ancestor(node, name): - if getattr(node, "tagName") == name: + if getattr(node, "tagName", None) == name: return node parent = getattr(node, "parentNode", None) if not parent: @@ -30,8 +30,8 @@ def fix_vfuncs(dom): name = record.getAttribute("name") cname = record.getAttribute("c:type") - assert(name.endswith("Class")) - assert(cname.endswith("Class")) + assert(name.endswith("Class") or name.endswith("Iface")) + assert(cname.endswith("Class") or name.endswith("Iface")) params = (f.getElementsByTagName("parameters") or [None])[0] -- cgit v1.2.1