Opening for reading is sufficient
This commit is contained in:
parent
8809b8db56
commit
5f7bc8bff2
@ -254,7 +254,7 @@ def main(args=sys.argv):
|
|||||||
|
|
||||||
if args.print_window_size:
|
if args.print_window_size:
|
||||||
screen_size_function.ans = None
|
screen_size_function.ans = None
|
||||||
with open('/dev/tty', 'w') as tty:
|
with open('/dev/tty') as tty:
|
||||||
ss = screen_size_function(tty)()
|
ss = screen_size_function(tty)()
|
||||||
print('{}x{}'.format(ss.width, ss.height))
|
print('{}x{}'.format(ss.width, ss.height))
|
||||||
raise SystemExit(0)
|
raise SystemExit(0)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user