jenkins-bot has submitted this change and it was merged. (
https://gerrit.wikimedia.org/r/523712 )
Change subject: [bugfix] Don't try to import coordinates if they are not
supported
......................................................................
[bugfix] Don't try to import coordinates if they are not supported
Otherwise an exception is raised.
Change-Id: Ib809bd575d32aacf44e4bf63285ec4cd4c104d03
---
M scripts/coordinate_import.py
1 file changed, 3 insertions(+), 2 deletions(-)
Approvals:
Xqt: Looks good to me, approved
jenkins-bot: Verified
diff --git a/scripts/coordinate_import.py b/scripts/coordinate_import.py
index 732ec11..ea4c46a 100755
--- a/scripts/coordinate_import.py
+++ b/scripts/coordinate_import.py
@@ -114,8 +114,9 @@
if page is None:
# running over items, search in linked pages
for page in item.iterlinks():
- if self.try_import_coordinates_from_page(page, item):
- break
+ if page.site.has_extension('GeoData'):
+ if self.try_import_coordinates_from_page(page, item):
+ break
return
self.try_import_coordinates_from_page(page, item)
--
To view, visit https://gerrit.wikimedia.org/r/523712
To unsubscribe, or for help writing mail filters, visit
https://gerrit.wikimedia.org/r/settings
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: Ib809bd575d32aacf44e4bf63285ec4cd4c104d03
Gerrit-Change-Number: 523712
Gerrit-PatchSet: 1
Gerrit-Owner: Matěj Suchánek <[email protected]>
Gerrit-Reviewer: D3r1ck01 <[email protected]>
Gerrit-Reviewer: John Vandenberg <[email protected]>
Gerrit-Reviewer: Matěj Suchánek <[email protected]>
Gerrit-Reviewer: Xqt <[email protected]>
Gerrit-Reviewer: jenkins-bot (75)
_______________________________________________
Pywikibot-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/pywikibot-commits