Commit 415be935 authored by Avery Pennarun's avatar Avery Pennarun

options.py: don't die if tty width is set to 0.

This sometimes happens if weird people, such as myself, open a pty without
setting the width field correctly.
parent d4c9d310
......@@ -60,7 +60,7 @@ def _tty_width():
except (IOError, ImportError):
return _atoi(os.environ.get('WIDTH')) or 70
(ysize,xsize,ypix,xpix) = struct.unpack('HHHH', s)
return xsize
return xsize or 70
class Options:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment