mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-11 16:57:51 -06:00
Ensure string matching is done with strings
This commit is contained in:
parent
5f31551184
commit
76536fe715
1 changed files with 2 additions and 2 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue