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
No related tags found
No related merge requests found
...@@ -336,9 +336,6 @@ def _LoadStructure(structure_path, sformat, fault_tolerant, bu_id): ...@@ -336,9 +336,6 @@ def _LoadStructure(structure_path, sformat, fault_tolerant, bu_id):
for biounit in cif_info.biounits: for biounit in cif_info.biounits:
if biounit.id == bu_id: if biounit.id == bu_id:
entity = ost.mol.alg.CreateBU(cif_entity, biounit) entity = ost.mol.alg.CreateBU(cif_entity, biounit)
if not entity.IsValid():
raise IOError(
"Provided file does not contain valid entity.")
break break
else: else:
raise RuntimeError(f"No biounit found with ID '{bu_id}'.") raise RuntimeError(f"No biounit found with ID '{bu_id}'.")
......
...@@ -582,9 +582,6 @@ def _LoadStructure(structure_path, sformat, fault_tolerant, bu_id): ...@@ -582,9 +582,6 @@ def _LoadStructure(structure_path, sformat, fault_tolerant, bu_id):
for biounit in cif_info.biounits: for biounit in cif_info.biounits:
if biounit.id == bu_id: if biounit.id == bu_id:
entity = ost.mol.alg.CreateBU(cif_entity, biounit) entity = ost.mol.alg.CreateBU(cif_entity, biounit)
if not entity.IsValid():
raise IOError(
"Provided file does not contain valid entity.")
break break
else: else:
raise RuntimeError(f"No biounit found with ID '{bu_id}'.") 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.
Please register or to comment