From 76536fe715d21cd7b577c54143a964f8311a562e Mon Sep 17 00:00:00 2001 From: ChrisTerBeke Date: Tue, 1 Oct 2019 19:52:40 +0200 Subject: [PATCH] Ensure string matching is done with strings --- plugins/UM3NetworkPrinting/src/Cloud/CloudOutputDevice.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/UM3NetworkPrinting/src/Cloud/CloudOutputDevice.py b/plugins/UM3NetworkPrinting/src/Cloud/CloudOutputDevice.py index bfe5a5728a..4db68560a4 100644 --- a/plugins/UM3NetworkPrinting/src/Cloud/CloudOutputDevice.py +++ b/plugins/UM3NetworkPrinting/src/Cloud/CloudOutputDevice.py @@ -124,11 +124,11 @@ class CloudOutputDevice(UltimakerNetworkedPrinterOutputDevice): def matchesNetworkKey(self, network_key: str) -> bool: # Typically, a network key looks like "ultimakersystem-aabbccdd0011._ultimaker._tcp.local." # the host name should then be "ultimakersystem-aabbccdd0011" - if network_key.startswith(self.clusterData.host_name): + if network_key.startswith(str(self.clusterData.host_name)): return True # However, for manually added printers, the local IP address is used in lieu of a proper # network key, so check for that as well. It is in the format "manual:10.1.10.1". - if network_key.endswith(self.clusterData.host_internal_ip): + if network_key.endswith(str(self.clusterData.host_internal_ip)): return True return False