diff options
author | Nick Wellnhofer <wellnhofer@aevum.de> | 2022-08-24 00:12:59 +0200 |
---|---|---|
committer | Nick Wellnhofer <wellnhofer@aevum.de> | 2022-08-24 00:51:52 +0200 |
commit | 288c951effecfa1da5b81c8578dccb952afff2fc (patch) | |
tree | a3d1aa865fc37f73f6e42184a357fe53f471406d /doc | |
parent | 92bb889be3bcbd1aaf64286d592f19e2060a273f (diff) | |
download | libxml2-288c951effecfa1da5b81c8578dccb952afff2fc.tar.gz |
Fix update call in apibuild.py
There are still a few places where try/except is used for branching.
This is a bad idea since it can hide errors like this one.
Diffstat (limited to 'doc')
-rwxr-xr-x | doc/apibuild.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/doc/apibuild.py b/doc/apibuild.py index 30e4d2dd..8bf8bbd3 100755 --- a/doc/apibuild.py +++ b/doc/apibuild.py @@ -192,10 +192,10 @@ class index: if name[0:2] == '__': return None d = None - try: + if name in self.identifiers: d = self.identifiers[name] - d.update(header, module, type, lineno, info, extra, conditionals) - except: + d.update(header, module, type, info, extra, conditionals) + else: d = identifier(name, header, module, type, lineno, info, extra, conditionals) self.identifiers[name] = d @@ -214,10 +214,10 @@ class index: if name[0:2] == '__': return None d = None - try: + if name in self.identifiers: d = self.identifiers[name] - d.update(header, module, type, lineno, info, extra, conditionals) - except: + d.update(header, module, type, info, extra, conditionals) + else: d = identifier(name, header, module, type, lineno, info, extra, conditionals) self.identifiers[name] = d |