File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -66,6 +66,8 @@ def _read_decay_string(self, line: str) -> str:
6666 else self ._read_substring (line , self .START_DECAYSTRING , len (line ))
6767 )
6868
69+ if decay_string is None :
70+ decay_string = "UNKNOWN"
6971 # Get the first value in the ';' separated list
7072 # Get the initial part of the first value
7173 filtered = re .split ('=| |~|<|>' , decay_string .split (';' )[0 ])[0 ]
@@ -81,7 +83,8 @@ def _read_decay_string(self, line: str) -> str:
8183 def _read_line (self , line : str ) -> dict :
8284 """Read a line of the file."""
8385 # Ignore isomers for the moment
84- if self ._read_as_int (line , self .START_STATE , self .END_STATE ) > 0 :
86+ state = self ._read_as_int (line , self .START_STATE , self .END_STATE )
87+ if state is None or state > 0 :
8588 return dict ()
8689
8790 exp = True if line .find ("#" ) == - 1 else False
You can’t perform that action at this time.
0 commit comments