mirror of https://github.com/tqdm/tqdm.git
Gracefully handle empty COLUMNS/LINES env vars on Linux.
This commit is contained in:
parent
6180f188fb
commit
963137c123
|
@ -285,7 +285,7 @@ def _screen_shape_linux(fp): # pragma: no cover
|
|||
except Exception:
|
||||
try:
|
||||
return [int(os.environ[i]) - 1 for i in ("COLUMNS", "LINES")]
|
||||
except KeyError:
|
||||
except (KeyError, ValueError):
|
||||
return None, None
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue