jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/339946 )
Change subject: __init__.py:Added extra checking for more descriptive error raising
......................................................................
__init__.py:Added extra checking for more descriptive error raising
Bug: T151526
Change-Id: Iea120e768289f869fcb1c3afa691271e037621b4
---
M pywikibot/__init__.py
1 file changed, 2 insertions(+), 0 deletions(-)
Approvals:
jenkins-bot: Verified
Xqt: Looks good to me, approved
diff --git a/pywikibot/__init__.py b/pywikibot/__init__.py
index b980330..5434f75 100644
--- a/pywikibot/__init__.py
+++ b/pywikibot/__init__.py
@@ -497,6 +497,8 @@
if calendarmodel is None:
if site is None:
site = Site().data_repository()
+ if site is None:
+ raise ValueError('Site %s has no data repository' % Site())
calendarmodel = site.calendarmodel()
self.calendarmodel = calendarmodel
--
To view, visit https://gerrit.wikimedia.org/r/339946
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Iea120e768289f869fcb1c3afa691271e037621b4
Gerrit-PatchSet: 3
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Honeypot95 <iulian.birlica(a)gmail.com>
Gerrit-Reviewer: John Vandenberg <jayvdb(a)gmail.com>
Gerrit-Reviewer: Magul <tomasz.magulski(a)gmail.com>
Gerrit-Reviewer: Strainu <wiki(a)strainu.ro>
Gerrit-Reviewer: Xqt <info(a)gno.de>
Gerrit-Reviewer: jenkins-bot <>