jenkins-bot submitted this change.
[bugfix] Fix argument for NoWikibaseEntityError
The exception class overrides the initializer and does not
accept another exception instance. Pass it a (fake) entity
to avoid AttributeError.
Change-Id: I91f2c24a846f3edc2dbbf5eefebf922d5ea30e7e
---
M pywikibot/page/_wikibase.py
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/pywikibot/page/_wikibase.py b/pywikibot/page/_wikibase.py
index afb189b..6b0ad93 100644
--- a/pywikibot/page/_wikibase.py
+++ b/pywikibot/page/_wikibase.py
@@ -1458,8 +1458,11 @@
"""
try:
prop_type = self.repo.getPropertyType(self)
- except KeyError as e:
- raise NoWikibaseEntityError(e)
+ except KeyError:
+ raise NoWikibaseEntityError(
+ self if isinstance(self, WikibaseEntity)
+ else WikibaseEntity(self.repo, self.id)
+ ) from None
return prop_type
To view, visit change 1082153. To unsubscribe, or for help writing mail filters, visit settings.