Correct style in arcstat and arc_summary

Fix arcstat and arc_summary so they pass
flake8 python code style checks.

Signed-off-by: Giuseppe Di Natale <dinatale2@llnl.gov>
This commit is contained in:
Giuseppe Di Natale
2016-10-06 10:04:54 -07:00
parent 5cc78dc812
commit 0bde1f7cb5
2 changed files with 51 additions and 58 deletions
+6 -1
View File
@@ -229,15 +229,19 @@ def print_header():
sys.stdout.write("%*s%s" % (cols[col][0], col, sep))
sys.stdout.write("\n")
def get_terminal_lines():
try:
import fcntl, termios, struct
import fcntl
import termios
import struct
data = fcntl.ioctl(sys.stdout.fileno(), termios.TIOCGWINSZ, '1234')
sz = struct.unpack('hh', data)
return sz[0]
except:
pass
def update_hdr_intr():
global hdr_intr
@@ -245,6 +249,7 @@ def update_hdr_intr():
if lines and lines > 3:
hdr_intr = lines - 3
def resize_handler(signum, frame):
update_hdr_intr()