Skip to content

Commit

Permalink
Merge pull request #49 from MPI-Dortmund/fix-crash-old-cbox
Browse files Browse the repository at this point in the history
Fix crash when reading old cbox files
  • Loading branch information
thorstenwagner authored Sep 5, 2023
2 parents b286cd7 + c37f79b commit dd95166
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/box_manager/io/cbox.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,9 @@ def has_shapes(path: os.PathLike) -> bool:
read_filament_shapes(path)
except KeyError:
return False
except TypeError:
# In that case, probably an old cbox format was loaded.
return False
else:
return True

Expand Down

0 comments on commit dd95166

Please sign in to comment.