From 14076c4b1dbbd141912f9c7c8eed194b89556b45 Mon Sep 17 00:00:00 2001 From: Changmao Cheng Date: Thu, 14 Dec 2017 18:52:20 +0800 Subject: [PATCH 1/2] Update _tqdm.py Fix bug reported at [issue 487](https://github.com/tqdm/tqdm/issues/487) --- tqdm/_tqdm.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tqdm/_tqdm.py b/tqdm/_tqdm.py index b915c6cf7..d0aacc7ce 100755 --- a/tqdm/_tqdm.py +++ b/tqdm/_tqdm.py @@ -761,10 +761,10 @@ def __init__(self, iterable=None, desc=None, total=None, leave=True, if disable is None and hasattr(file, "isatty") and not file.isatty(): disable = True - + + self.disable = disable if disable: self.iterable = iterable - self.disable = disable self.pos = self._get_free_pos(self) self._instances.remove(self) self.n = initial From cc6f3e3d50dd419ce2ef4f26fc570a2a129a2fcf Mon Sep 17 00:00:00 2001 From: Changmao Cheng Date: Thu, 14 Dec 2017 19:00:22 +0800 Subject: [PATCH 2/2] Update _tqdm.py --- tqdm/_tqdm.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tqdm/_tqdm.py b/tqdm/_tqdm.py index d0aacc7ce..b1ef0af8c 100755 --- a/tqdm/_tqdm.py +++ b/tqdm/_tqdm.py @@ -761,7 +761,7 @@ def __init__(self, iterable=None, desc=None, total=None, leave=True, if disable is None and hasattr(file, "isatty") and not file.isatty(): disable = True - + self.disable = disable if disable: self.iterable = iterable