We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9a9f43b commit df292e5Copy full SHA for df292e5
bdx/__init__.py
@@ -81,4 +81,9 @@ def error(msg, *args):
81
def make_progress_bar(*args, **kwargs):
82
"""Return ``tqdm`` progress bar if available."""
83
disable = os.getenv("BDX_DISABLE_PROGRESS_BAR") is not None
84
+ try:
85
+ disable |= not os.isatty(sys.stdout.fileno())
86
+ except IOError:
87
+ # In case fileno() is unsupported
88
+ pass
89
return tqdm.tqdm(*args, disable=disable, **kwargs)
0 commit comments