mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-08 07:27:29 -06:00
Don't use a newline at the beginning of the sync message
Again, this breaks stuff. See the previous commit. Contributes to issue CURA-7201.
This commit is contained in:
parent
633bdac21a
commit
f918f39fc2
2 changed files with 9 additions and 5 deletions
|
@ -1,3 +1,6 @@
|
||||||
|
# Copyright (c) 2020 Ultimaker B.V.
|
||||||
|
# Cura is released under the terms of the LGPLv3 or higher.
|
||||||
|
|
||||||
import json
|
import json
|
||||||
from typing import Optional
|
from typing import Optional
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,6 @@
|
||||||
|
# Copyright (c) 2020 Ultimaker B.V.
|
||||||
|
# Cura is released under the terms of the LGPLv3 or higher.
|
||||||
|
|
||||||
import tempfile
|
import tempfile
|
||||||
from typing import Dict, List, Any
|
from typing import Dict, List, Any
|
||||||
|
|
||||||
|
@ -81,11 +84,9 @@ class DownloadPresenter:
|
||||||
return DownloadPresenter(self._app)
|
return DownloadPresenter(self._app)
|
||||||
|
|
||||||
def _createProgressMessage(self) -> Message:
|
def _createProgressMessage(self) -> Message:
|
||||||
return Message(i18n_catalog.i18nc(
|
return Message(i18n_catalog.i18nc("@info:generic", "Syncing..."),
|
||||||
"@info:generic",
|
|
||||||
"\nSyncing..."),
|
|
||||||
lifetime = 0,
|
lifetime = 0,
|
||||||
use_inactivity_timer=False,
|
use_inactivity_timer = False,
|
||||||
progress = 0.0,
|
progress = 0.0,
|
||||||
title = i18n_catalog.i18nc("@info:title", "Changes detected from your Ultimaker account", ))
|
title = i18n_catalog.i18nc("@info:title", "Changes detected from your Ultimaker account", ))
|
||||||
|
|
||||||
|
@ -93,7 +94,7 @@ class DownloadPresenter:
|
||||||
self._progress[package_id]["received"] = self._progress[package_id]["total"]
|
self._progress[package_id]["received"] = self._progress[package_id]["total"]
|
||||||
|
|
||||||
try:
|
try:
|
||||||
with tempfile.NamedTemporaryFile(mode ="wb+", suffix =".curapackage", delete = False) as temp_file:
|
with tempfile.NamedTemporaryFile(mode = "wb+", suffix = ".curapackage", delete = False) as temp_file:
|
||||||
bytes_read = reply.read(self.DISK_WRITE_BUFFER_SIZE)
|
bytes_read = reply.read(self.DISK_WRITE_BUFFER_SIZE)
|
||||||
while bytes_read:
|
while bytes_read:
|
||||||
temp_file.write(bytes_read)
|
temp_file.write(bytes_read)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue