Fix: extra ConfigParsaer arg added to wrong call

CURA-6522
This commit is contained in:
Nino van Hooff 2019-12-10 16:33:47 +01:00
parent 7f969528f3
commit 8aae5f7563

View file

@ -10,7 +10,7 @@ from UM.VersionUpgrade import VersionUpgrade
class VersionUpgrade44to45(VersionUpgrade):
def getCfgVersion(self, serialised: str) -> int:
parser = configparser.ConfigParser(interpolation = None, comment_prefixes=())
parser = configparser.ConfigParser(interpolation = None)
parser.read_string(serialised)
format_version = int(parser.get("general", "version")) # Explicitly give an exception when this fails. That means that the file format is not recognised.
setting_version = int(parser.get("metadata", "setting_version", fallback = "0"))
@ -35,7 +35,7 @@ class VersionUpgrade44to45(VersionUpgrade):
#
# This renames the renamed settings in the containers.
def upgradeInstanceContainer(self, serialized: str, filename: str) -> Tuple[List[str], List[str]]:
parser = configparser.ConfigParser(interpolation = None)
parser = configparser.ConfigParser(interpolation = None, comment_prefixes=())
parser.read_string(serialized)
# Update version number.