jenkins-bot has submitted this change and it was merged.
Change subject: Fix UnboundLocalError ......................................................................
Fix UnboundLocalError
In python3 there may be UnboundLocalError in case of exception during save
Change-Id: I8ae74d00b63bc20b2eed511687a4feb3bc2e58ca --- M pywikibot/page.py 1 file changed, 2 insertions(+), 1 deletion(-)
Approvals: XZise: Looks good to me, approved jenkins-bot: Verified
diff --git a/pywikibot/page.py b/pywikibot/page.py index e089fc2..5f58dee 100644 --- a/pywikibot/page.py +++ b/pywikibot/page.py @@ -1057,7 +1057,8 @@ else: pywikibot.output(u"Page %s saved" % link) # TODO: other "expected" error types to catch? - except pywikibot.Error as err: + except pywikibot.Error as edit_err: + err = edit_err # edit_err will be deleted in the end of the scope pywikibot.log(u"Error saving page %s (%s)\n" % (link, err), exc_info=True) if not callback and not async:
pywikibot-commits@lists.wikimedia.org