jenkins-bot has submitted this change and it was merged.
Change subject: Bug 58053 - catch Exception *as* ......................................................................
Bug 58053 - catch Exception *as*
Change-Id: I4401bd6a4463b8c8cc2f127b34165c984c3a95cb --- M pywikibot/userinterfaces/win32_unicode.py 1 file changed, 4 insertions(+), 4 deletions(-)
Approvals: Xqt: Looks good to me, approved jenkins-bot: Verified
diff --git a/pywikibot/userinterfaces/win32_unicode.py b/pywikibot/userinterfaces/win32_unicode.py index 44ec80c..5e452c6 100755 --- a/pywikibot/userinterfaces/win32_unicode.py +++ b/pywikibot/userinterfaces/win32_unicode.py @@ -165,7 +165,7 @@ if self._hConsole is None: try: self._stream.flush() - except Exception, e: + except Exception as e: _complain("%s.flush: %r from %r" % (self.name, e, self._stream)) raise @@ -195,7 +195,7 @@ if remaining == 0: break text = text[n.value:] - except Exception, e: + except Exception as e: _complain("%s.write: %r" % (self.name, e)) raise
@@ -203,7 +203,7 @@ try: for line in lines: self.write(line) - except Exception, e: + except Exception as e: _complain("%s.writelines: %r" % (self.name, e)) raise
@@ -223,7 +223,7 @@ else: stderr = UnicodeOutput(None, sys.stderr, old_stderr_fileno, '<Unicode redirected stderr>') - except Exception, e: + except Exception as e: _complain("exception %r while fixing up sys.stdout and sys.stderr" % (e,))
# While we're at it, let's unmangle the command-line arguments:
pywikibot-commits@lists.wikimedia.org