Merge branch 'master' into WIP_onboarding

This commit is contained in:
Ghostkeeper 2019-04-03 11:53:40 +02:00
commit ae9395aebb
No known key found for this signature in database
GPG key ID: 86BEF881AE2CF276
13 changed files with 69 additions and 104 deletions

View file

@ -85,7 +85,15 @@ class GlobalStack(CuraContainerStack):
# Requesting it from the metadata actually gets them as strings (as that's what you get from serializing).
# But we do want them returned as a list of ints (so the rest of the code can directly compare)
connection_types = self.getMetaDataEntry("connection_type", "").split(",")
return [int(connection_type) for connection_type in connection_types if connection_type != ""]
result = []
for connection_type in connection_types:
if connection_type != "":
try:
result.append(int(connection_type))
except ValueError:
# We got invalid data, probably a None.
pass
return result
## \sa configuredConnectionTypes
def addConfiguredConnectionType(self, connection_type: int) -> None: