Skip to content

Commit

Permalink
Merge pull request #336 from RWTH-EBC/issue335_dataBug
Browse files Browse the repository at this point in the history
Issue335 data bug
  • Loading branch information
MichaMans authored Oct 31, 2016
2 parents 45505ca + ea1f1dc commit ec22bee
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions teaser/data/dataclass.py
Original file line number Diff line number Diff line change
@@ -130,16 +130,20 @@ def load_mat_binding(self):

if version_parse is False:
import teaser.data.bindings.v_0_4.material_bind as mat_bind
self.element_bind = mat_bind.MaterialTemplates()
if bool(version_parse.getroot().attrib) is False:
self.material_bind = mat_bind.MaterialTemplates()
elif bool(version_parse.getroot().attrib) is False:
warnings.warn(
"You are using an old version of material data base XML file")
import teaser.data.bindings.v_0_3_9.material_bind as mat_bind
self.material_bind = mat_bind.CreateFromDocument(
__xml_file_mat.read())
elif version_parse.getroot().attrib['version'] == "0.3.9":
warnings.warn(
"You are using an old version of material data base XML file")
import teaser.data.bindings.v_0_3_9.material_bind as mat_bind
self.material_bind = mat_bind.CreateFromDocument(
__xml_file_mat.read())
elif version_parse.getroot().attrib['version'] == "0.4":
import teaser.data.bindings.v_0_4.material_bind as mat_bind

self.material_bind = mat_bind.CreateFromDocument(__xml_file_mat.read())
self.material_bind = mat_bind.CreateFromDocument(
__xml_file_mat.read())

0 comments on commit ec22bee

Please sign in to comment.