We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 72ecb67 commit 926396eCopy full SHA for 926396e
1 file changed
update_gui.py
@@ -94,7 +94,11 @@ def download(self):
94
if chunk:
95
total_downloaded += len(chunk)
96
f.write(chunk)
97
- self.signal.emit(f"Downloading update... {((total_downloaded / content_length) * 100):.2f}%")
+ if content_length:
98
+ percent = (total_downloaded / content_length) * 100
99
+ self.signal.emit(f"Downloading update... {percent:.2f}%")
100
+ else:
101
+ self.signal.emit(f"Downloading update... {total_downloaded / 1024 / 1024:.2f} MB")
102
except Exception as e:
103
self.signal.emit(f"ABORTING: {str(e)}")
104
0 commit comments