mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-07 15:07:28 -06:00
Also check the upgrade plugins.
This commit is contained in:
parent
1b43e4981e
commit
cf85831d87
2 changed files with 6 additions and 6 deletions
|
@ -26,7 +26,7 @@ class Profile:
|
||||||
#
|
#
|
||||||
# \param serialised A string with the contents of a profile.
|
# \param serialised A string with the contents of a profile.
|
||||||
# \param filename The supposed filename of the profile, without extension.
|
# \param filename The supposed filename of the profile, without extension.
|
||||||
def __init__(self, serialised: str, filename: str):
|
def __init__(self, serialised: str, filename: str) -> None:
|
||||||
self._filename = filename
|
self._filename = filename
|
||||||
|
|
||||||
parser = configparser.ConfigParser(interpolation = None)
|
parser = configparser.ConfigParser(interpolation = None)
|
||||||
|
@ -58,17 +58,17 @@ class Profile:
|
||||||
self._material_name = None
|
self._material_name = None
|
||||||
|
|
||||||
# Parse the settings.
|
# Parse the settings.
|
||||||
self._settings = {}
|
self._settings = {} # type: Dict[str,str]
|
||||||
if parser.has_section("settings"):
|
if parser.has_section("settings"):
|
||||||
for key, value in parser["settings"].items():
|
for key, value in parser["settings"].items():
|
||||||
self._settings[key] = value
|
self._settings[key] = value
|
||||||
|
|
||||||
# Parse the defaults and the disabled defaults.
|
# Parse the defaults and the disabled defaults.
|
||||||
self._changed_settings_defaults = {}
|
self._changed_settings_defaults = {} # type: Dict[str,str]
|
||||||
if parser.has_section("defaults"):
|
if parser.has_section("defaults"):
|
||||||
for key, value in parser["defaults"].items():
|
for key, value in parser["defaults"].items():
|
||||||
self._changed_settings_defaults[key] = value
|
self._changed_settings_defaults[key] = value
|
||||||
self._disabled_settings_defaults = []
|
self._disabled_settings_defaults = [] # type: List[str]
|
||||||
if parser.has_section("disabled_defaults"):
|
if parser.has_section("disabled_defaults"):
|
||||||
disabled_defaults_string = parser.get("disabled_defaults", "values")
|
disabled_defaults_string = parser.get("disabled_defaults", "values")
|
||||||
self._disabled_settings_defaults = [item for item in disabled_defaults_string.split(",") if item != ""] # Split by comma.
|
self._disabled_settings_defaults = [item for item in disabled_defaults_string.split(",") if item != ""] # Split by comma.
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
import os
|
import os
|
||||||
import subprocess
|
import subprocess
|
||||||
|
|
||||||
os.putenv("MYPYPATH", r".;.\plugins;..\Uranium_hint\;..\Uranium_hint\stubs\\" )
|
os.putenv("MYPYPATH", r".;.\plugins;.\plugins\VersionUpgrade;..\Uranium_hint\;..\Uranium_hint\stubs\\" )
|
||||||
|
|
||||||
def findModules(path):
|
def findModules(path):
|
||||||
result = []
|
result = []
|
||||||
|
@ -14,7 +14,7 @@ def findModules(path):
|
||||||
plugins = findModules("plugins")
|
plugins = findModules("plugins")
|
||||||
plugins.sort()
|
plugins.sort()
|
||||||
|
|
||||||
mods = ["cura"] + plugins
|
mods = ["cura"] + plugins + findModules("plugins/VersionUpgrade")
|
||||||
|
|
||||||
for mod in mods:
|
for mod in mods:
|
||||||
print("------------- Checking module {mod}".format(**locals()))
|
print("------------- Checking module {mod}".format(**locals()))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue