mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-08 23:46:22 -06:00
Setting progress won't cause devision by zero anymore
CURA-49
This commit is contained in:
parent
bb1a616c1f
commit
4090e461df
1 changed files with 4 additions and 1 deletions
|
@ -173,7 +173,10 @@ class NetworkPrinterOutputDevice(PrinterOutputDevice):
|
|||
self._progress_message.hide()
|
||||
|
||||
def _onUploadProgress(self, bytes_sent, bytes_total):
|
||||
self._progress_message.setProgress(bytes_sent / bytes_total * 100)
|
||||
if bytes_total > 0:
|
||||
self._progress_message.setProgress(bytes_sent / bytes_total * 100)
|
||||
else:
|
||||
self._progress_message.setProgress(0)
|
||||
|
||||
def _httpGet(self, path):
|
||||
return requests.get("http://" + self._address + self._api_prefix + path)
|
Loading…
Add table
Add a link
Reference in a new issue