jenkins-bot merged this change.
[FIX] Remove unused exception variables
Change-Id: If398f301c8001b05cec8f87d6f70f34132290560
---
M pwb.py
M scripts/transferbot.py
M tests/site_tests.py
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/pwb.py b/pwb.py
index 67a0682..4299842 100755
--- a/pwb.py
+++ b/pwb.py
@@ -172,7 +172,7 @@
os.environ[str('PYWIKIBOT2_DIR_PWB')] = _pwb_dir
import pywikibot
pwb = pywikibot
-except RuntimeError as err:
+except RuntimeError:
# user-config.py to be created
if filename is not None and not (filename.startswith('generate_')
or filename == 'version.py'):
diff --git a/scripts/transferbot.py b/scripts/transferbot.py
index e1f9b5d..7f91449 100755
--- a/scripts/transferbot.py
+++ b/scripts/transferbot.py
@@ -176,11 +176,11 @@
if __name__ == "__main__":
try:
main()
- except TargetSiteMissing as e:
+ except TargetSiteMissing:
pywikibot.error(u'Need to specify a target site and/or language')
pywikibot.error(u'Try running this script with -help for help/usage')
pywikibot.exception()
- except TargetPagesMissing as e:
+ except TargetPagesMissing:
pywikibot.error(u'Need to specify a page range')
pywikibot.error(u'Try running this script with -help for help/usage')
pywikibot.exception()
diff --git a/tests/site_tests.py b/tests/site_tests.py
index 8d78737..2d42957 100644
--- a/tests/site_tests.py
+++ b/tests/site_tests.py
@@ -2069,7 +2069,7 @@
except api.APIError as error:
if error.code == u'badtoken':
raise unittest.SkipTest(error)
- except pywikibot.Error as error:
+ except pywikibot.Error:
# expected result
pass
To view, visit change 434209. To unsubscribe, visit settings.