jenkins-bot has submitted this change and it was merged. (
https://gerrit.wikimedia.org/r/582522 )
Change subject: Site.page_restrictions(): Do not raise NoPage
......................................................................
Site.page_restrictions(): Do not raise NoPage
Nonexistent pages can be protected, so treat all pages the same.
Bug: T214286
Change-Id: I2bcb85a294ea3ce9709cc9d7700abea87e3f841c
---
M pywikibot/site/__init__.py
1 file changed, 0 insertions(+), 2 deletions(-)
Approvals:
Dvorapa: Looks good to me, but someone else must approve
Xqt: Looks good to me, approved
jenkins-bot: Verified
diff --git a/pywikibot/site/__init__.py b/pywikibot/site/__init__.py
index bd0a87f..f9a4f64 100644
--- a/pywikibot/site/__init__.py
+++ b/pywikibot/site/__init__.py
@@ -3148,8 +3148,6 @@
def page_restrictions(self, page):
"""Return a dictionary reflecting page
protections."""
- if not page.exists():
- raise NoPage(page)
if not hasattr(page, '_protection'):
self.loadpageinfo(page)
return page._protection
--
To view, visit
https://gerrit.wikimedia.org/r/582522
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: I2bcb85a294ea3ce9709cc9d7700abea87e3f841c
Gerrit-Change-Number: 582522
Gerrit-PatchSet: 2
Gerrit-Owner: JJMC89 <JJMC89.Wikimedia(a)gmail.com>
Gerrit-Reviewer: Dvorapa <dvorapa(a)seznam.cz>
Gerrit-Reviewer: Xqt <info(a)gno.de>
Gerrit-Reviewer: jenkins-bot (75)