Skip to content

Get rid of exception when closing tqdm_notebook without a total#239

Merged
lrq3000 merged 2 commits intotqdm:masterfrom
aplavin:patch-1
Aug 16, 2016
Merged

Get rid of exception when closing tqdm_notebook without a total#239
lrq3000 merged 2 commits intotqdm:masterfrom
aplavin:patch-1

Conversation

@aplavin
Copy link
Copy Markdown
Contributor

@aplavin aplavin commented Aug 16, 2016

No description provided.

@coveralls
Copy link
Copy Markdown

coveralls commented Aug 16, 2016

Coverage Status

Coverage remained the same at 90.776% when pulling 7fdc628 on aplavin:patch-1 into 6aa1cfd on tqdm:master.

Comment thread tqdm/_tqdm_notebook.py Outdated
# Try to detect if there was an error or KeyboardInterrupt
# in manual mode: if n < total, things probably got wrong
if self.n < self.total:
if self.total is not None and self.n < self.total:
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @aplavin !

Can you please just change the line to:

if self.total and self.n < self.total:

(except if there's a specific reason you want to check is not None)

@lrq3000 lrq3000 added the p0-bug-critical ☢ Exception rasing label Aug 16, 2016
@codecov-io
Copy link
Copy Markdown

codecov-io commented Aug 16, 2016

Current coverage is 90.56% (diff: 100%)

Merging #239 into master will not change coverage

@@             master       #239   diff @@
==========================================
  Files             7          7          
  Lines           477        477          
  Methods           0          0          
  Messages          0          0          
  Branches         85         85          
==========================================
  Hits            432        432          
  Misses           44         44          
  Partials          1          1          

Powered by Codecov. Last update 6aa1cfd...3139a7e

@coveralls
Copy link
Copy Markdown

coveralls commented Aug 16, 2016

Coverage Status

Coverage remained the same at 90.776% when pulling 3139a7e on aplavin:patch-1 into 6aa1cfd on tqdm:master.

@lrq3000
Copy link
Copy Markdown
Member

lrq3000 commented Aug 16, 2016

Perfect, thank's a lot ! 👍

@lrq3000 lrq3000 merged commit 1fde116 into tqdm:master Aug 16, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

p0-bug-critical ☢ Exception rasing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants