Opening for reading is sufficient

This commit is contained in:
Kovid Goyal 2018-05-28 14:11:10 +05:30
parent 8809b8db56
commit 5f7bc8bff2
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -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)