Merge pull request #10 from jbd/patch-1

Check for fileno attribute in _tty_width function
This commit is contained in:
Brian May 2015-05-13 11:01:05 +10:00
commit a38963301e

View File

@ -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