mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2024-12-27 11:29:36 +03:00
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 <mail@gmelikov.ru> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Giuseppe Di Natale <dinatale2@llnl.gov> Closes #6776
This commit is contained in:
parent
d9daa7abcf
commit
63e5e960ba
@ -238,7 +238,7 @@ def get_terminal_lines():
|
|||||||
data = fcntl.ioctl(sys.stdout.fileno(), termios.TIOCGWINSZ, '1234')
|
data = fcntl.ioctl(sys.stdout.fileno(), termios.TIOCGWINSZ, '1234')
|
||||||
sz = struct.unpack('hh', data)
|
sz = struct.unpack('hh', data)
|
||||||
return sz[0]
|
return sz[0]
|
||||||
except:
|
except Exception:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
||||||
|
@ -150,7 +150,7 @@ class Cmd(object):
|
|||||||
try:
|
try:
|
||||||
kp = Popen(cmd)
|
kp = Popen(cmd)
|
||||||
kp.wait()
|
kp.wait()
|
||||||
except:
|
except Exception:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
def update_cmd_privs(self, cmd, user):
|
def update_cmd_privs(self, cmd, user):
|
||||||
@ -629,16 +629,16 @@ class TestRun(object):
|
|||||||
base = self.outputdir
|
base = self.outputdir
|
||||||
|
|
||||||
while not done:
|
while not done:
|
||||||
l = []
|
paths = []
|
||||||
components -= 1
|
components -= 1
|
||||||
for testfile in tmp_dict.keys():
|
for testfile in tmp_dict.keys():
|
||||||
uniq = '/'.join(testfile.split('/')[components:]).lstrip('/')
|
uniq = '/'.join(testfile.split('/')[components:]).lstrip('/')
|
||||||
if uniq not in l:
|
if uniq not in paths:
|
||||||
l.append(uniq)
|
paths.append(uniq)
|
||||||
tmp_dict[testfile].outputdir = os.path.join(base, uniq)
|
tmp_dict[testfile].outputdir = os.path.join(base, uniq)
|
||||||
else:
|
else:
|
||||||
break
|
break
|
||||||
done = total == len(l)
|
done = total == len(paths)
|
||||||
|
|
||||||
def setup_logging(self, options):
|
def setup_logging(self, options):
|
||||||
"""
|
"""
|
||||||
|
Loading…
Reference in New Issue
Block a user