mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 02:27:36 +03:00
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:
@@ -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()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user