mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-10 12:29:02 +08:00
Add paramteter to Config Parser constructor to prevent comments in
Gcode to be remnoved by upgrade, as in CURA-6994 CURA-6522
This commit is contained in:
parent
558ed4b1e8
commit
e2db4e873d
@ -10,7 +10,7 @@ from UM.VersionUpgrade import VersionUpgrade
|
||||
|
||||
class VersionUpgrade44to45(VersionUpgrade):
|
||||
def getCfgVersion(self, serialised: str) -> int:
|
||||
parser = configparser.ConfigParser(interpolation = None)
|
||||
parser = configparser.ConfigParser(interpolation = None, comment_prefixes=())
|
||||
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"))
|
||||
|
Loading…
x
Reference in New Issue
Block a user