Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(202)

Unified Diff: third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/win.py

Issue 2580293002: Style change: Rename error variables "e" -> "error" (Closed)
Patch Set: Rebase and fix formatter unittest. Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/win.py
diff --git a/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/win.py b/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/win.py
index 202ac18688162198aec65302695a6509aa4bb03e..863d88655a7b65ee2fed6e39c6bc7eef0ce20738 100644
--- a/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/win.py
+++ b/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/win.py
@@ -31,11 +31,12 @@
import errno
import logging
+# The _winreg library is only available on Windows.
+# https://docs.python.org/2/library/_winreg.html
try:
- import _winreg
-except ImportError as e:
- _winreg = None
- WindowsError = Exception # this shuts up pylint.
+ import _winreg # pylint: disable=import-error
+except ImportError:
+ _winreg = None # pylint: disable=invalid-name
from webkitpy.layout_tests.breakpad.dump_reader_win import DumpReaderWin
from webkitpy.layout_tests.models import test_run_results
@@ -120,9 +121,9 @@ class WinPort(base.Port):
# existing entry points to a valid path and has the right command line.
if len(args) == 2 and self._filesystem.exists(args[0]) and args[0].endswith('perl.exe') and args[1] == '-wT':
return True
- except WindowsError as e:
- if e.errno != errno.ENOENT:
- raise e
+ except WindowsError as error: # WindowsError is not defined on non-Windows platforms - pylint: disable=undefined-variable
+ if error.errno != errno.ENOENT:
+ raise
# The key simply probably doesn't exist.
# Note that we write to HKCU so that we don't need privileged access

Powered by Google App Engine
This is Rietveld 408576698