[Git][reproducible-builds/diffoscope][master] fix exception in the progressbar handler

Mattia Rizzolo gitlab at salsa.debian.org
Tue Dec 24 14:11:28 UTC 2019



Mattia Rizzolo pushed to branch master at Reproducible Builds / diffoscope


Commits:
8706b874 by Eli Schwartz at 2019-12-17T01:09:00Z
fix exception in the progressbar handler

We're trying to check whether the finished attribute has not yet been
defined to True, but in the case we're searching for, it hasn't been
defined at all and simply raises an AttributeError.

Since any case where it's undefined is by definition the False case
we're looking for, fall back to that.

- - - - -


1 changed file:

- diffoscope/progress.py


Changes:

=====================================
diffoscope/progress.py
=====================================
@@ -45,7 +45,7 @@ class ProgressLoggingHandler(logging.StreamHandler):
     def emit(self, record):
         try:
             super().emit(record)
-            if not self.progressbar.bar.finished:
+            if not getattr(self.progressbar.bar, 'finished', False):
                 self.progressbar.bar.update()
         except Exception:
             # Wrap otherwise tests fail due to test_progress.py call main()



View it on GitLab: https://salsa.debian.org/reproducible-builds/diffoscope/commit/8706b87418a6614ff9a01e02d19da0c95bef65bc

-- 
View it on GitLab: https://salsa.debian.org/reproducible-builds/diffoscope/commit/8706b87418a6614ff9a01e02d19da0c95bef65bc
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.reproducible-builds.org/pipermail/rb-commits/attachments/20191224/a42d8182/attachment.htm>


More information about the rb-commits mailing list