mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 09:23:56 +00:00
Argument to struct.pack must be a string not unicode.
This commit is contained in:
parent
e2b8ec9255
commit
ec86cfde0e
@ -708,7 +708,7 @@ class Terminal(object):
|
||||
def __detect_parent_terminal_size(self):
|
||||
try:
|
||||
TIOCGWINSZ = getattr(termios, 'TIOCGWINSZ', 1074295912)
|
||||
packed = struct.pack('HHHH', 0, 0, 0, 0)
|
||||
packed = struct.pack(str('HHHH'), 0, 0, 0, 0) # future lint: blacklisted-function
|
||||
ioctl = fcntl.ioctl(sys.stdin.fileno(), TIOCGWINSZ, packed)
|
||||
return struct.unpack('HHHH', ioctl)[0:2]
|
||||
except IOError:
|
||||
|
Loading…
Reference in New Issue
Block a user