Eranroz has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/206356

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(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/56/206356/1

diff --git a/pywikibot/page.py b/pywikibot/page.py
index e089fc2..6e45c69 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
             pywikibot.log(u"Error saving page %s (%s)\n" % (link, err),
                           exc_info=True)
             if not callback and not async:

-- 
To view, visit https://gerrit.wikimedia.org/r/206356
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8ae74d00b63bc20b2eed511687a4feb3bc2e58ca
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Eranroz <eranro...@gmail.com>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to