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 #6776
data = fcntl.ioctl(sys.stdout.fileno(), termios.TIOCGWINSZ, '1234')
sz = struct.unpack('hh', data)
return sz[0]
- except:
+ except Exception:
pass
try:
kp = Popen(cmd)
kp.wait()
- except:
+ except Exception:
pass
def update_cmd_privs(self, cmd, user):
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):
"""