mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-22 00:06:12 -05:00
[sipify] Fix staticmethod (#59517)
* [sipify] Fix staticmethod When building bindings for Kadas, we get an AttributeError on startup and not a NameError. * [pre-commit.ci lite] apply automatic fixes --------- Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
This commit is contained in:
parent
6933b1352f
commit
4ddc236145
@ -3105,10 +3105,9 @@ for _class, additions in class_additions.items():
|
||||
if additions:
|
||||
this_class_additions = "\n".join(" " + c for c in additions)
|
||||
CONTEXT.output_python.append(
|
||||
f"try:\n{this_class_additions}\nexcept NameError:\n pass\n"
|
||||
f"try:\n{this_class_additions}\nexcept (NameError, AttributeError):\n pass\n"
|
||||
)
|
||||
|
||||
|
||||
if args.python_output and CONTEXT.output_python:
|
||||
|
||||
with open(args.python_output, "w") as f:
|
||||
|
Loading…
x
Reference in New Issue
Block a user