From f918f39fc2563ec464ab641fab2b520f47ec9199 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Mon, 24 Feb 2020 14:33:10 +0100 Subject: [PATCH] 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. --- plugins/Toolbox/src/CloudSync/CloudPackageChecker.py | 3 +++ plugins/Toolbox/src/CloudSync/DownloadPresenter.py | 11 ++++++----- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/plugins/Toolbox/src/CloudSync/CloudPackageChecker.py b/plugins/Toolbox/src/CloudSync/CloudPackageChecker.py index 1f8b153c8f..7d223c87c6 100644 --- a/plugins/Toolbox/src/CloudSync/CloudPackageChecker.py +++ b/plugins/Toolbox/src/CloudSync/CloudPackageChecker.py @@ -1,3 +1,6 @@ +# Copyright (c) 2020 Ultimaker B.V. +# Cura is released under the terms of the LGPLv3 or higher. + import json from typing import Optional diff --git a/plugins/Toolbox/src/CloudSync/DownloadPresenter.py b/plugins/Toolbox/src/CloudSync/DownloadPresenter.py index d79d031949..743d96c574 100644 --- a/plugins/Toolbox/src/CloudSync/DownloadPresenter.py +++ b/plugins/Toolbox/src/CloudSync/DownloadPresenter.py @@ -1,3 +1,6 @@ +# Copyright (c) 2020 Ultimaker B.V. +# Cura is released under the terms of the LGPLv3 or higher. + import tempfile from typing import Dict, List, Any @@ -81,11 +84,9 @@ class DownloadPresenter: return DownloadPresenter(self._app) def _createProgressMessage(self) -> Message: - return Message(i18n_catalog.i18nc( - "@info:generic", - "\nSyncing..."), + return Message(i18n_catalog.i18nc("@info:generic", "Syncing..."), lifetime = 0, - use_inactivity_timer=False, + use_inactivity_timer = False, progress = 0.0, 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"] 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) while bytes_read: temp_file.write(bytes_read)