Skip to content

Commit

Permalink
Remove unneeded exception catch
Browse files Browse the repository at this point in the history
  • Loading branch information
claudep committed Feb 24, 2024
1 parent 9402ffe commit ff23afd
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/tablib/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -311,10 +311,7 @@ def _set_headers(self, collection):
"""Validating headers setter."""
self._validate(collection)
if collection:
try:
self.__headers = list(collection)
except TypeError:
raise TypeError
self.__headers = list(collection)
else:
self.__headers = None

Expand Down

0 comments on commit ff23afd

Please sign in to comment.