From f10397acf98d640e70e7a3e7e7522644571d05d1 Mon Sep 17 00:00:00 2001 From: Lipu Fei Date: Mon, 9 Oct 2017 12:38:16 +0200 Subject: [PATCH 1/3] Always set finish flag when finalizing post_reply CURA-4398 --- plugins/UM3NetworkPrinting/NetworkPrinterOutputDevice.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/UM3NetworkPrinting/NetworkPrinterOutputDevice.py b/plugins/UM3NetworkPrinting/NetworkPrinterOutputDevice.py index 58b62217f0..af2e1f8c00 100755 --- a/plugins/UM3NetworkPrinting/NetworkPrinterOutputDevice.py +++ b/plugins/UM3NetworkPrinting/NetworkPrinterOutputDevice.py @@ -527,12 +527,12 @@ class NetworkPrinterOutputDevice(PrinterOutputDevice): self._last_request_time = time() def _finalizePostReply(self): - if self._post_reply is None: - return - # Indicate uploading was finished (so another file can be send) self._write_finished = True + if self._post_reply is None: + return + try: try: self._post_reply.uploadProgress.disconnect(self._onUploadProgress) From 7d8fa71c4cad749de1437a825a62466bfb4df687 Mon Sep 17 00:00:00 2001 From: Lipu Fei Date: Mon, 9 Oct 2017 13:04:55 +0200 Subject: [PATCH 2/3] Exclude other UM2 machine during quality profile upgrade CURA-4420 --- .../VersionUpgrade27to30.py | 21 +++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/plugins/VersionUpgrade/VersionUpgrade27to30/VersionUpgrade27to30.py b/plugins/VersionUpgrade/VersionUpgrade27to30/VersionUpgrade27to30.py index 3b1b854761..d0b78168b4 100644 --- a/plugins/VersionUpgrade/VersionUpgrade27to30/VersionUpgrade27to30.py +++ b/plugins/VersionUpgrade/VersionUpgrade27to30/VersionUpgrade27to30.py @@ -117,8 +117,25 @@ class VersionUpgrade27to30(VersionUpgrade): # Set the definition to "ultimaker2" for Ultimaker 2 quality changes if not parser.has_section("general"): parser.add_section("general") - if os.path.basename(filename).startswith("ultimaker2_"): - parser["general"]["definition"] = "ultimaker2" + + # Need to exclude the following names: + # - ultimaker2_plus + # - ultimaker2_go + # - ultimaker2_extended + # - ultimaker2_extended_plus + exclude_prefix_list = ["ultimaker2_plus_", + "ultimaker2_go_", + "ultimaker2_extended_", + "ultimaker2_extended_plus_"] + file_base_name = os.path.basename(filename) + if file_base_name.startswith("ultimaker2_"): + skip_this = False + for exclude_prefix in exclude_prefix_list: + if file_base_name.startswith(exclude_prefix): + skip_this = True + break + if not skip_this: + parser["general"]["definition"] = "ultimaker2" # Update version numbers parser["general"]["version"] = "2" From 2b06d04327c4a0b7ed27bb687c442ba3bfda8b58 Mon Sep 17 00:00:00 2001 From: Lipu Fei Date: Mon, 9 Oct 2017 13:54:15 +0200 Subject: [PATCH 3/3] Fix container indices in upgrade script from 2.5 to 2.6 --- .../VersionUpgrade25to26/VersionUpgrade25to26.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/plugins/VersionUpgrade/VersionUpgrade25to26/VersionUpgrade25to26.py b/plugins/VersionUpgrade/VersionUpgrade25to26/VersionUpgrade25to26.py index 2c598ad766..e1c14be2e1 100644 --- a/plugins/VersionUpgrade/VersionUpgrade25to26/VersionUpgrade25to26.py +++ b/plugins/VersionUpgrade/VersionUpgrade25to26/VersionUpgrade25to26.py @@ -127,7 +127,12 @@ class VersionUpgrade25to26(VersionUpgrade): machine_id = parser["general"]["id"] quality_container_id = parser["containers"]["2"] material_container_id = parser["containers"]["3"] - definition_container_id = parser["containers"]["6"] + + # we don't have definition_changes container in 2.5 + if "6" in parser["containers"]: + definition_container_id = parser["containers"]["6"] + else: + definition_container_id = parser["containers"]["5"] if definition_container_id == "custom" and not self._checkCustomFdmPrinterHasExtruderStack(machine_id): # go through all extruders and make sure that this custom FDM printer has 8 extruder stacks.