diff options
author | Eitan Isaacson <eitan@monotonous.org> | 2011-05-14 21:38:45 -0400 |
---|---|---|
committer | Eitan Isaacson <eitan@monotonous.org> | 2011-05-24 13:04:11 -0700 |
commit | 0921f78660b7b0784ebe2fa586dd54551704699e (patch) | |
tree | ceb2bf334479a2d70972d513799d51aeff14ae59 /tools | |
parent | c1a605a2451f14e05ee3aa6a2bdfaabf336c4f2a (diff) | |
download | caribou-0921f78660b7b0784ebe2fa586dd54551704699e.tar.gz |
Fix fix_gir.py to work with ginterfaces and to support delegates.
Diffstat (limited to 'tools')
-rwxr-xr-x | tools/fix_gir.py | 6 |
1 files changed, 3 insertions, 3 deletions
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] |