Don't break if current settings machine is unknown

Currently it sets the user profile to 'empty', which is bad because empty is read-only. But it allows me to continue for now. I'll find a solution for that later.

Contributes to issue CURA-844.
This commit is contained in:
Ghostkeeper 2016-08-09 17:01:11 +02:00
parent 36b027b290
commit 9c7a28fa2d
No known key found for this signature in database
GPG key ID: 701948C5954A7385
2 changed files with 6 additions and 2 deletions

View file

@ -99,7 +99,7 @@ class Profile:
translated_machine = VersionUpgrade21to22.VersionUpgrade21to22.VersionUpgrade21to22.translatePrinter(self._machine_type_id)
config.set("general", "definition", translated_machine)
else:
config.set("general", "definition", "fdmprinter")
config.set("general", "definition", "fdmprinter") #In this case, the machine definition is unknown, and it might now have machine-specific profiles, in which case this will fail.
config.add_section("metadata")
if self._type: