POM in Config aufgenommen
This commit is contained in:
@@ -17,7 +17,8 @@ class JsonBasedConfig:
|
||||
def load_json_from_file(self):
|
||||
"""lade das json file vom gegeben Pfad in ein json Objekt"""
|
||||
with open(self._config_path, 'r', encoding='utf-8') as fh:
|
||||
return json.loads(fh.read())
|
||||
content = fh.read()
|
||||
return json.loads(content)
|
||||
|
||||
def from_json(self, json_str):
|
||||
"""nimm den Json String zur Initialisierung des Objektes"""
|
||||
@@ -267,11 +268,11 @@ class MaterialTransConfig(JsonBasedConfig):
|
||||
return ret
|
||||
|
||||
def get_material_of_type(self, mat):
|
||||
"""hole alle Materialien, welche in der config Datei definiert sind"""
|
||||
"""hole alle Materialien, welche zu diesem Werkstofftyp existieren"""
|
||||
if not self._materials:
|
||||
self.load_materials()
|
||||
return self._materials[mat]
|
||||
|
||||
|
||||
|
||||
|
||||
class IniBasedConfig:
|
||||
|
||||
Reference in New Issue
Block a user