jenkins-bot has submitted this change. (
https://gerrit.wikimedia.org/r/c/pywikibot/core/+/1061035?usp=email )
Change subject: [fix] check whether tile exists first
......................................................................
[fix] check whether tile exists first
This is a temporary solution for T372106.
FilePage.exists() gives True if the file decription exists even there
is no file at all but file_is_shared() fails with missing imageinfo
exception. We should have a way to check for existing image.
For this special case such files should be delinked.
Bug: T372106
Change-Id: Ieec85c7de50ba65433f2d9731aaf65316fb74c55
---
M scripts/delinker.py
1 file changed, 1 insertion(+), 1 deletion(-)
Approvals:
Xqt: Looks good to me, approved
Aram: Looks good to me, but someone else must approve
jenkins-bot: Verified
diff --git a/scripts/delinker.py b/scripts/delinker.py
index 13513ac..975d424 100755
--- a/scripts/delinker.py
+++ b/scripts/delinker.py
@@ -93,7 +93,7 @@
def skip_page(self, page) -> bool:
"""Skip pages which neither exists locally nor on shared repository."""
pywikibot.info('.', newline=False)
- if page.file_is_shared() or page.exists():
+ if page.exists() or page.file_is_shared():
return True
return super().skip_page(page)
--
To view, visit
https://gerrit.wikimedia.org/r/c/pywikibot/core/+/1061035?usp=email
To unsubscribe, or for help writing mail filters, visit
https://gerrit.wikimedia.org/r/settings?usp=email
Gerrit-MessageType: merged
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Change-Id: Ieec85c7de50ba65433f2d9731aaf65316fb74c55
Gerrit-Change-Number: 1061035
Gerrit-PatchSet: 2
Gerrit-Owner: Xqt <[email protected]>
Gerrit-Reviewer: Aram <[email protected]>
Gerrit-Reviewer: D3r1ck01 <[email protected]>
Gerrit-Reviewer: Xqt <[email protected]>
Gerrit-Reviewer: jenkins-bot
_______________________________________________
Pywikibot-commits mailing list -- [email protected]
To unsubscribe send an email to [email protected]