From 5cd05c565c5769cd201bb8213ad23e2562c61dc5 Mon Sep 17 00:00:00 2001 From: hpk Date: Wed, 18 Mar 2009 20:39:33 +0100 Subject: [PATCH] [svn r63053] forbid too small windows width for now --HG-- branch : trunk --- py/io/terminalwriter.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/py/io/terminalwriter.py b/py/io/terminalwriter.py index b903f57f6..0e19f3744 100644 --- a/py/io/terminalwriter.py +++ b/py/io/terminalwriter.py @@ -75,6 +75,8 @@ def get_terminal_width(): except: # FALLBACK width = int(os.environ.get('COLUMNS', 80))-1 + # XXX the windows getdimensions may be bogus, let's sanify a bit + width = max(width, 40) # we alaways need 40 chars return width terminal_width = get_terminal_width()