Opening for reading is sufficient

This commit is contained in:
Kovid Goyal
2018-05-28 14:11:10 +05:30
parent 8809b8db56
commit 5f7bc8bff2

View File

@@ -254,7 +254,7 @@ def main(args=sys.argv):
if args.print_window_size:
screen_size_function.ans = None
with open('/dev/tty', 'w') as tty:
with open('/dev/tty') as tty:
ss = screen_size_function(tty)()
print('{}x{}'.format(ss.width, ss.height))
raise SystemExit(0)