We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5f070f4 commit e82b4fcCopy full SHA for e82b4fc
bpython/curtsiesfrontend/repl.py
@@ -464,7 +464,12 @@ def __init__(
464
465
# as long as the first event received is a window resize event,
466
# this works fine...
467
- self.width, self.height = os.get_terminal_size()
+ try:
468
+ self.width, self.height = os.get_terminal_size()
469
+ except OSError:
470
+ # this case will trigger during unit tests when stdout is redirected
471
+ self.width = -1
472
+ self.height = -1
473
474
self.status_bar.message(banner)
475
0 commit comments