diff options
author | j.delarago <joeydelarago@gmail.com> | 2022-06-15 13:53:42 +0300 |
---|---|---|
committer | j.delarago <joeydelarago@gmail.com> | 2022-06-15 13:53:42 +0300 |
commit | f7bc55db15d6d567136c8a631c223a59e545d2e1 (patch) | |
tree | 2f7c70dc1d8d4dc18a8e715779f4c6e7de74702f /cura | |
parent | febb7f1205451546ad543505d2104bd5fdb0d92e (diff) |
Revert "temu extra logging for debugging"
This reverts commit febb7f1205451546ad543505d2104bd5fdb0d92e.
Diffstat (limited to 'cura')
-rw-r--r-- | cura/CuraPackageManager.py | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/cura/CuraPackageManager.py b/cura/CuraPackageManager.py index ef36e5c777..87a2935d96 100644 --- a/cura/CuraPackageManager.py +++ b/cura/CuraPackageManager.py @@ -59,12 +59,10 @@ class CuraPackageManager(PackageManager): def isMaterialBundled(self, file_name: str, guid: str): """ Check if there is a bundled material name with file_name and guid """ - Logger.error(f"Paths: {list(Resources.getSecureSearchPaths())}") for path in Resources.getSecureSearchPaths(): # Secure search paths are install directory paths, if a material is in here it must be bundled. paths = [Path(p) for p in glob.glob(path + '/**/*.xml.fdm_material')] - Logger.error(f"Paths: {[(material.name, str(material)) for material in paths]}") for material in paths: if material.name == file_name: with open(str(material), encoding="utf-8") as f: @@ -75,14 +73,12 @@ class CuraPackageManager(PackageManager): f.read(), "GUID") if guid == parsed_guid: # The material we found matches both filename and GUID - Logger.error("MATERIAL IS BUNDLED") return True return False def getMaterialFilePackageId(self, file_name: str, guid: str) -> str: """Get the id of the installed material package that contains file_name""" - Logger.error(f'Material package search paths {[f for f in os.scandir(self._installation_dirs_dict["materials"]) if f.is_dir()]}') for material_package in [f for f in os.scandir(self._installation_dirs_dict["materials"]) if f.is_dir()]: package_id = material_package.name @@ -91,7 +87,7 @@ class CuraPackageManager(PackageManager): # File with the name we are looking for is not in this directory continue - with open(os.path.join(root, file_name), encoding="utf-8") as f: + with open(root + "/" + file_name, encoding="utf-8") as f: # Make sure the file we found has the same guid as our material # Parsing this xml would be better but the namespace is needed to search it. parsed_guid = PluginRegistry.getInstance().getPluginObject("XmlMaterialProfile").getMetadataFromSerialized( |