Skip to content
Snippets Groups Projects
Unverified Commit eb943f7f authored by Xavier Robin's avatar Xavier Robin
Browse files

cleanup: remove unnecessary check

CreateBU always returns a valid entity. We already check if it's empty
separately.
parent cca8d787
No related branches found
Tags PYTHON3-v1.0.0
No related merge requests found
......@@ -336,9 +336,6 @@ def _LoadStructure(structure_path, sformat, fault_tolerant, bu_id):
for biounit in cif_info.biounits:
if biounit.id == bu_id:
entity = ost.mol.alg.CreateBU(cif_entity, biounit)
if not entity.IsValid():
raise IOError(
"Provided file does not contain valid entity.")
break
else:
raise RuntimeError(f"No biounit found with ID '{bu_id}'.")
......
......@@ -582,9 +582,6 @@ def _LoadStructure(structure_path, sformat, fault_tolerant, bu_id):
for biounit in cif_info.biounits:
if biounit.id == bu_id:
entity = ost.mol.alg.CreateBU(cif_entity, biounit)
if not entity.IsValid():
raise IOError(
"Provided file does not contain valid entity.")
break
else:
raise RuntimeError(f"No biounit found with ID '{bu_id}'.")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment