Browse Source

Catch TypeError when parsing setting version

Someone had a list in the setting version, which then crashed Cura.
Ghostkeeper 4 years ago
parent
commit
1b8463ba30
1 changed files with 3 additions and 1 deletions
  1. 3 1
      cura/Settings/CuraContainerRegistry.py

+ 3 - 1
cura/Settings/CuraContainerRegistry.py

@@ -400,7 +400,9 @@ class CuraContainerRegistry(ContainerRegistry):
         try:
             if int(metadata["setting_version"]) != cura.CuraApplication.CuraApplication.SettingVersion:
                 return False
-        except ValueError: #Not parsable as int.
+        except ValueError:  # Not parsable as int.
+            return False
+        except TypeError:  # Expecting string input here, not e.g. list or anything.
             return False
         return True