Skip to content

Commit

Permalink
Correct flake8 errors after STYLE builder update
Browse files Browse the repository at this point in the history
Fix new flake8 errors related to bare excepts and ambiguous
variable names due to a STYLE builder update.

Reviewed-by: George Melikov <mail@gmelikov.ru>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Giuseppe Di Natale <dinatale2@llnl.gov>
Closes openzfs#6776
  • Loading branch information
dinatale2 authored and Nasf-Fan committed Feb 13, 2018
1 parent 811e2ed commit 084ca1a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion cmd/arcstat/arcstat.py
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand Down
10 changes: 5 additions & 5 deletions tests/test-runner/bin/test-runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ def kill_cmd(self, proc):
try:
kp = Popen(cmd)
kp.wait()
except:
except Exception:
pass

def update_cmd_privs(self, cmd, user):
Expand Down Expand Up @@ -629,16 +629,16 @@ def complete_outputdirs(self):
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):
"""
Expand Down

0 comments on commit 084ca1a

Please sign in to comment.