mirror of
https://github.com/sshuttle/sshuttle.git
synced 2025-01-05 21:48:54 +01:00
Merge pull request #10 from jbd/patch-1
Check for fileno attribute in _tty_width function
This commit is contained in:
commit
a38963301e
@ -61,6 +61,8 @@ def _remove_negative_k(k):
|
||||
|
||||
|
||||
def _tty_width():
|
||||
if not hasattr(sys.stderr, "fileno"):
|
||||
return _atoi(os.environ.get('WIDTH')) or 70
|
||||
s = struct.pack("HHHH", 0, 0, 0, 0)
|
||||
try:
|
||||
import fcntl
|
||||
|
Loading…
Reference in New Issue
Block a user