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
pywikibot-commits@lists.wikimedia.org