Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/Ultimaker/Cura.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/cura
diff options
context:
space:
mode:
authorj.delarago <joeydelarago@gmail.com>2022-06-15 14:26:29 +0300
committerj.delarago <joeydelarago@gmail.com>2022-06-15 14:26:29 +0300
commit5d0e4238d595056f4f7f51af0a736d17afa94611 (patch)
tree2afa17f267aed55d91cb6d2e3baa38765de79745 /cura
parentf7bc55db15d6d567136c8a631c223a59e545d2e1 (diff)
Use os.path.join instead of appending a "/" since this is os specific.
Remove possible bad conversion to str for path.
Diffstat (limited to 'cura')
-rw-r--r--cura/CuraPackageManager.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/cura/CuraPackageManager.py b/cura/CuraPackageManager.py
index 87a2935d96..12a77fd234 100644
--- a/cura/CuraPackageManager.py
+++ b/cura/CuraPackageManager.py
@@ -65,7 +65,7 @@ class CuraPackageManager(PackageManager):
paths = [Path(p) for p in glob.glob(path + '/**/*.xml.fdm_material')]
for material in paths:
if material.name == file_name:
- with open(str(material), encoding="utf-8") as f:
+ with open(material, 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(
@@ -87,7 +87,7 @@ class CuraPackageManager(PackageManager):
# File with the name we are looking for is not in this directory
continue
- with open(root + "/" + file_name, encoding="utf-8") as f:
+ with open(os.path.join(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(