Skip to content

Commit

Permalink
Fix exception style
Browse files Browse the repository at this point in the history
  • Loading branch information
Cali Garmo committed Feb 9, 2024
1 parent b5c1232 commit 69048ea
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -87,3 +87,6 @@ ENV/

# Rope project settings
.ropeproject

# vim stuff
*.swp
4 changes: 2 additions & 2 deletions oriented_matroids/abstract_oriented_matroid.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,9 +167,9 @@ def convert_to(self, new_type=None):
if new_type is None:
raise TypeError("Must be given a type to convert to")
elif new_type in AbstractOrientedMatroid.keys:
try:
if hasattr(self, new_type + 's'):
els = getattr(self, new_type + 's')()
except:
else:
raise NotImplementedError("No %ss() method found in oriented matroid" % (new_type,))
return OrientedMatroid(els,
key=new_type,
Expand Down

0 comments on commit 69048ea

Please sign in to comment.