diff --git a/plugins/LegacyProfileReader/DictionaryOfDoom.json b/plugins/LegacyProfileReader/DictionaryOfDoom.json index efbfcac7d4..6ff6dac4dd 100644 --- a/plugins/LegacyProfileReader/DictionaryOfDoom.json +++ b/plugins/LegacyProfileReader/DictionaryOfDoom.json @@ -1,6 +1,6 @@ { "source_version": "15.04", - "target_version": "2.1", + "target_version": 1, "translation": { "line_width": "nozzle_size", diff --git a/plugins/LegacyProfileReader/LegacyProfileReader.py b/plugins/LegacyProfileReader/LegacyProfileReader.py index 5491b3ca18..5d89a85978 100644 --- a/plugins/LegacyProfileReader/LegacyProfileReader.py +++ b/plugins/LegacyProfileReader/LegacyProfileReader.py @@ -82,6 +82,14 @@ class LegacyProfileReader(ProfileReader): Logger.log("e", "Could not parse DictionaryOfDoom.json: %s", str(e)) return None + #Check the target version in the Dictionary of Doom with this application version. + if "target_version" not in dict_of_doom: + Logger.log("e", "Dictionary of Doom has no target version. Is it the correct JSON file?") + return None + if Profile.ProfileVersion != dict_of_doom["target_version"]: + Logger.log("e", "Dictionary of Doom of legacy profile reader (version %s) is not in sync with the profile version (version %s)!", dict_of_doom["target_version"], str(Profile.ProfileVersion)) + return None + if "translation" not in dict_of_doom: Logger.log("e", "Dictionary of Doom has no translation. Is it the correct JSON file?") return None