From 695c7d826706ebc59c707c6bb9eed4a5a25e348f Mon Sep 17 00:00:00 2001 From: Simon Edwards Date: Thu, 4 Jan 2018 13:26:13 +0100 Subject: [PATCH] Rename the `_live_multiparts` to the even better `_kept_alive_multiparts` name CL-541 --- cura/PrinterOutput/NetworkedPrinterOutputDevice.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cura/PrinterOutput/NetworkedPrinterOutputDevice.py b/cura/PrinterOutput/NetworkedPrinterOutputDevice.py index 73bd5e192b..f2acc2115d 100644 --- a/cura/PrinterOutput/NetworkedPrinterOutputDevice.py +++ b/cura/PrinterOutput/NetworkedPrinterOutputDevice.py @@ -47,7 +47,7 @@ class NetworkedPrinterOutputDevice(PrinterOutputDevice): # QHttpMultiPart objects need to be kept alive and not garbage collected during the # HTTP which uses them. We hold references to these QHttpMultiPart objects here. - self._live_multiparts = {} # type: Dict[QNetworkReply, QHttpMultiPart] + self._kept_alive_multiparts = {} # type: Dict[QNetworkReply, QHttpMultiPart] self._sending_gcode = False self._compressing_gcode = False @@ -172,8 +172,8 @@ class NetworkedPrinterOutputDevice(PrinterOutputDevice): return "Unknown User" # Couldn't find out username. def _clearCachedMultiPart(self, reply: QNetworkReply) -> None: - if reply in self._live_multiparts: - del self._live_multiparts[reply] + if reply in self._kept_alive_multiparts: + del self._kept_alive_multiparts[reply] def put(self, target: str, data: str, onFinished: Optional[Callable[[Any, QNetworkReply], None]]) -> None: if self._manager is None: @@ -221,7 +221,7 @@ class NetworkedPrinterOutputDevice(PrinterOutputDevice): reply = self._manager.post(request, multi_post_part) - self._live_multiparts[reply] = multi_post_part + self._kept_alive_multiparts[reply] = multi_post_part if onProgress is not None: reply.uploadProgress.connect(onProgress)