mirror of
https://github.com/ARM-software/workload-automation.git
synced 2025-09-03 20:02:39 +01:00
wa: PEP8 Fixes
This commit is contained in:
@@ -61,7 +61,7 @@ def _get_terminal_size_windows():
|
||||
sizex = right - left + 1
|
||||
sizey = bottom - top + 1
|
||||
return sizex, sizey
|
||||
except:
|
||||
except: # NOQA
|
||||
pass
|
||||
|
||||
|
||||
@@ -72,7 +72,7 @@ def _get_terminal_size_tput():
|
||||
cols = int(subprocess.check_call(shlex.split('tput cols')))
|
||||
rows = int(subprocess.check_call(shlex.split('tput lines')))
|
||||
return (cols, rows)
|
||||
except:
|
||||
except: # NOQA
|
||||
pass
|
||||
|
||||
|
||||
@@ -84,7 +84,7 @@ def _get_terminal_size_linux():
|
||||
cr = struct.unpack('hh',
|
||||
fcntl.ioctl(fd, termios.TIOCGWINSZ, '1234'))
|
||||
return cr
|
||||
except:
|
||||
except: # NOQA
|
||||
pass
|
||||
cr = ioctl_GWINSZ(0) or ioctl_GWINSZ(1) or ioctl_GWINSZ(2)
|
||||
if not cr:
|
||||
@@ -92,12 +92,12 @@ def _get_terminal_size_linux():
|
||||
fd = os.open(os.ctermid(), os.O_RDONLY)
|
||||
cr = ioctl_GWINSZ(fd)
|
||||
os.close(fd)
|
||||
except:
|
||||
except: # NOQA
|
||||
pass
|
||||
if not cr:
|
||||
try:
|
||||
cr = (os.environ['LINES'], os.environ['COLUMNS'])
|
||||
except:
|
||||
except: # NOQA
|
||||
return None
|
||||
return int(cr[1]), int(cr[0])
|
||||
|
||||
|
Reference in New Issue
Block a user