gui: fix TypeError on unknown `len()`

- fixes #971
This commit is contained in:
Casper da Costa-Luis 2020-06-28 21:12:31 +01:00
parent b18a31eb26
commit 6e4b48cfcb
No known key found for this signature in database
GPG Key ID: 986B408043AE090D
1 changed files with 1 additions and 1 deletions

View File

@ -53,7 +53,7 @@ class tqdm_gui(std_tqdm): # pragma: no cover
self.mininterval = max(self.mininterval, 0.5) self.mininterval = max(self.mininterval, 0.5)
self.fig, ax = plt.subplots(figsize=(9, 2.2)) self.fig, ax = plt.subplots(figsize=(9, 2.2))
# self.fig.subplots_adjust(bottom=0.2) # self.fig.subplots_adjust(bottom=0.2)
total = len(self) total = self.__len__() # avoids TypeError on None #971
if total is not None: if total is not None:
self.xdata = [] self.xdata = []
self.ydata = [] self.ydata = []