Also return tuple if upgrading failed

It is checked if the file data is None or empty (the upgrade is then considered 'failed'). But to unpack the file data, it needs to be a tuple.

Contributes to issue CURA-844.
This commit is contained in:
Ghostkeeper 2016-09-14 15:37:12 +02:00
parent 151fcfdda6
commit 5c49adc52e
No known key found for this signature in database
GPG key ID: 701948C5954A7385

View file

@ -80,7 +80,7 @@ class Profile:
import VersionUpgrade21to22 # Import here to prevent circular dependencies.
if self._name == "Current settings":
return None #Can't upgrade these, because the new current profile needs to specify the definition ID and the old file only had the machine instance, not the definition.
return None, None #Can't upgrade these, because the new current profile needs to specify the definition ID and the old file only had the machine instance, not the definition.
config = configparser.ConfigParser(interpolation = None)