jenkins-bot has submitted this change and it was merged.
Change subject: [bugfix] assign total variable to None in first step ......................................................................
[bugfix] assign total variable to None in first step
Initialize total variable to None. Otherwise an error may occur e.g. if all named parameters are None: UnboundLocalError: local variable 'total' referenced before assignment
Change-Id: I2b4f6a4be834a1098957ec4d73b91a73bdb45421 --- M pywikibot/pagegenerators.py 1 file changed, 1 insertion(+), 1 deletion(-)
Approvals: John Vandenberg: Looks good to me, approved jenkins-bot: Verified
diff --git a/pywikibot/pagegenerators.py b/pywikibot/pagegenerators.py index 10fde98..224f93a 100644 --- a/pywikibot/pagegenerators.py +++ b/pywikibot/pagegenerators.py @@ -585,9 +585,9 @@ # TODO: -*log used 500 as default total, also use with -logevents?
# 'start or None', because start might be an empty string + total = None start = start or None if isinstance(start, basestring) and len(start) == 8: - total = None start = pywikibot.Timestamp.strptime(start, '%Y%m%d') elif start is not None: try:
pywikibot-commits@lists.wikimedia.org