diff options
author | Florian Pritz <bluewind@xinu.at> | 2016-07-08 20:52:27 +0200 |
---|---|---|
committer | Florian Pritz <bluewind@xinu.at> | 2016-07-08 20:52:27 +0200 |
commit | f49403ae2c8b04f8ff76e074c780c6867f64f935 (patch) | |
tree | 5e7dca5f936e5d36c3312c506db61b8c07179495 /fb.py | |
parent | 45ee57fd19d574739d9f92272ba2987f7ebf86e5 (diff) |
This could be triggered by an empty file (really empty).
The assert is supposed to catch progress calls without a proper upload
total being set. We can easily use -1 rather than 0 for that.
Signed-off-by: Florian Pritz <bluewind@xinu.at>
Diffstat (limited to 'fb.py')
-rwxr-xr-x | fb.py | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -277,12 +277,12 @@ class ProgressBar: self.progressData["ulGlobalTotal"] = value def reset(self): - self.progressData["ulGlobalTotal"] = 0 + self.progressData["ulGlobalTotal"] = -1 self.progressData["ulGlobal"] = 0 def progress(self, dltotal, dlnow, ultotal, ulnow): data = self.progressData - assert data["ulGlobalTotal"] > 0 + assert data["ulGlobalTotal"] > -1 if not self.display_progress: return |