From eb943f7f25c1e0aa343fd9eb02bf176ee9feff75 Mon Sep 17 00:00:00 2001 From: Xavier Robin <xavalias-github@xavier.robin.name> Date: Thu, 1 Feb 2024 17:27:06 +0100 Subject: [PATCH] cleanup: remove unnecessary check CreateBU always returns a valid entity. We already check if it's empty separately. --- actions/ost-compare-ligand-structures | 3 --- actions/ost-compare-structures | 3 --- 2 files changed, 6 deletions(-) diff --git a/actions/ost-compare-ligand-structures b/actions/ost-compare-ligand-structures index c1e873f42..e8af175af 100644 --- a/actions/ost-compare-ligand-structures +++ b/actions/ost-compare-ligand-structures @@ -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}'.") diff --git a/actions/ost-compare-structures b/actions/ost-compare-structures index 900e9c3f7..56b040fb3 100644 --- a/actions/ost-compare-structures +++ b/actions/ost-compare-structures @@ -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}'.") -- GitLab