Catch TypeError when parsing setting version

Someone had a list in the setting version, which then crashed Cura.
This commit is contained in:
Ghostkeeper 2021-01-19 14:09:46 +01:00
parent 640e038ce7
commit 1b8463ba30
No known key found for this signature in database
GPG Key ID: 14C3586CD2EFC5B9

View File

@ -402,6 +402,8 @@ class CuraContainerRegistry(ContainerRegistry):
return False return False
except ValueError: # Not parsable as int. except ValueError: # Not parsable as int.
return False return False
except TypeError: # Expecting string input here, not e.g. list or anything.
return False
return True return True
def _configureProfile(self, profile: InstanceContainer, id_seed: str, new_name: str, machine_definition_id: str) -> Tuple[bool, Optional[str]]: def _configureProfile(self, profile: InstanceContainer, id_seed: str, new_name: str, machine_definition_id: str) -> Tuple[bool, Optional[str]]: