Skip to content

Commit

Permalink
Gracefully handle empty COLUMNS/LINES env vars on Linux.
Browse files Browse the repository at this point in the history
  • Loading branch information
jezdez authored and casperdcl committed May 31, 2021
1 parent 6180f18 commit 963137c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tqdm/utils.py
Expand Up @@ -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


Expand Down

0 comments on commit 963137c

Please sign in to comment.