mirror of
https://github.com/sshuttle/sshuttle.git
synced 2025-02-16 18:32:03 +01:00
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.
This commit is contained in:
parent
d4c9d31068
commit
415be935d4
@ -60,7 +60,7 @@ def _tty_width():
|
|||||||
except (IOError, ImportError):
|
except (IOError, ImportError):
|
||||||
return _atoi(os.environ.get('WIDTH')) or 70
|
return _atoi(os.environ.get('WIDTH')) or 70
|
||||||
(ysize,xsize,ypix,xpix) = struct.unpack('HHHH', s)
|
(ysize,xsize,ypix,xpix) = struct.unpack('HHHH', s)
|
||||||
return xsize
|
return xsize or 70
|
||||||
|
|
||||||
|
|
||||||
class Options:
|
class Options:
|
||||||
|
Loading…
Reference in New Issue
Block a user