From eae21e933b5205eda6a351c7a3830d2cfa544266 Mon Sep 17 00:00:00 2001 From: Bruno Alvisio Date: Wed, 13 Oct 2021 14:23:50 -0700 Subject: [PATCH] Add exception class to handle case where field in struct is not present --- scripts/cif2fasta.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/cif2fasta.py b/scripts/cif2fasta.py index 27d172ee..488ee89d 100755 --- a/scripts/cif2fasta.py +++ b/scripts/cif2fasta.py @@ -271,7 +271,7 @@ def protein_description(self): return protein_description.strip(',') - except AttributeError: + except (AttributeError, ValueError): if DEBUG_MODE > 1: print ('! {pdb} Could not extract pdbx_descriptor from struct table.'.format( pdb = self.pdb_entry()))