Skip to content

Commit

Permalink
ENH: removing unnecessary try except
Browse files Browse the repository at this point in the history
  • Loading branch information
juliomachad0 committed Jul 19, 2024
1 parent f3896dc commit ad67701
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions rocketpy/rocket/rocket.py
Original file line number Diff line number Diff line change
Expand Up @@ -964,10 +964,7 @@ def add_surfaces(self, surfaces, positions):
for surface, position in zip(surfaces, positions):
self.aerodynamic_surfaces.add(surface, position)
if isinstance(surface, RailButtons):
try:
self.rail_buttons.add(surface, position)
except TypeError:
self.rail_buttons.add(surface, positions)
self.rail_buttons.add(surface, position)

Check warning on line 967 in rocketpy/rocket/rocket.py

View check run for this annotation

Codecov / codecov/patch

rocketpy/rocket/rocket.py#L966-L967

Added lines #L966 - L967 were not covered by tests
except TypeError:
self.aerodynamic_surfaces.add(surfaces, positions)

Expand Down

0 comments on commit ad67701

Please sign in to comment.