fromupstream: fix pylint error: Redefining built-in 'file'
Apparently the commit bdbb9cc2c9dc ("fromupstream: Tag commits with
BACKPORT if appropriate") was submitted without running (or with
ignoring) the pre-upload hooks. Thus it wasn't pyling clean. After
that patch, we get this warning:
W: 29, 8: Redefining built-in 'file' (redefined-builtin)
Let's fix it.
BUG=None
TEST=No more pylint errors
Change-Id: Iee6ececc7ac459b91d6a9328c80ad0d1e9195bcf
Reviewed-on: https://chromium-review.googlesource.com/1035455
Commit-Ready: Douglas Anderson <dianders@chromium.org>
Tested-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Guenter Roeck <groeck@chromium.org>
diff --git a/contrib/fromupstream.py b/contrib/fromupstream.py
index 5818f05..f61d9ed 100755
--- a/contrib/fromupstream.py
+++ b/contrib/fromupstream.py
@@ -24,12 +24,12 @@
"""Report conflicting files."""
resolutions = ('DD', 'AU', 'UD', 'UA', 'DU', 'AA', 'UU')
conflicts = []
- files = subprocess.check_output(['git', 'status', '--porcelain',
+ lines = subprocess.check_output(['git', 'status', '--porcelain',
'--untracked-files=no']).split('\n')
- for file in files:
- if not file:
+ for line in lines:
+ if not line:
continue
- resolution, name = file.split(None, 1)
+ resolution, name = line.split(None, 1)
if resolution in resolutions:
conflicts.append(' ' + name)
if not conflicts: