aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGiuseppe Di Natale <[email protected]>2017-10-23 14:01:43 -0700
committerTony Hutter <[email protected]>2017-11-20 16:19:23 -0600
commitc45254b0ecccd7e9b26b84fe605cdb87901f3ba9 (patch)
treed2fbde4f25a2af738efa361f536ace9e57064616
parent318fdeb51f244c76ed03b40ef42ebdf7c510862a (diff)
Correct flake8 errors after STYLE builder update
Fix new flake8 errors related to bare excepts and ambiguous variable names due to a STYLE builder update. Reviewed-by: George Melikov <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Giuseppe Di Natale <[email protected]> Closes #6776
-rwxr-xr-xcmd/arcstat/arcstat.py2
-rwxr-xr-xtests/test-runner/cmd/test-runner.py10
2 files changed, 6 insertions, 6 deletions
diff --git a/cmd/arcstat/arcstat.py b/cmd/arcstat/arcstat.py
index b743fd8bc..d969da8d4 100755
--- a/cmd/arcstat/arcstat.py
+++ b/cmd/arcstat/arcstat.py
@@ -238,7 +238,7 @@ def get_terminal_lines():
data = fcntl.ioctl(sys.stdout.fileno(), termios.TIOCGWINSZ, '1234')
sz = struct.unpack('hh', data)
return sz[0]
- except:
+ except Exception:
pass
diff --git a/tests/test-runner/cmd/test-runner.py b/tests/test-runner/cmd/test-runner.py
index 4c53257df..8ad903c24 100755
--- a/tests/test-runner/cmd/test-runner.py
+++ b/tests/test-runner/cmd/test-runner.py
@@ -150,7 +150,7 @@ class Cmd(object):
try:
kp = Popen(cmd)
kp.wait()
- except:
+ except Exception:
pass
def update_cmd_privs(self, cmd, user):
@@ -629,16 +629,16 @@ class TestRun(object):
base = self.outputdir
while not done:
- l = []
+ paths = []
components -= 1
for testfile in tmp_dict.keys():
uniq = '/'.join(testfile.split('/')[components:]).lstrip('/')
- if uniq not in l:
- l.append(uniq)
+ if uniq not in paths:
+ paths.append(uniq)
tmp_dict[testfile].outputdir = os.path.join(base, uniq)
else:
break
- done = total == len(l)
+ done = total == len(paths)
def setup_logging(self, options):
"""