From ff23afdd3cc8eb2e4449d82df584d35a65eca1e4 Mon Sep 17 00:00:00 2001 From: Claude Paroz Date: Sat, 24 Feb 2024 12:48:11 +0100 Subject: [PATCH] Remove unneeded exception catch --- src/tablib/core.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/tablib/core.py b/src/tablib/core.py index c46ddee4..31e6ba88 100644 --- a/src/tablib/core.py +++ b/src/tablib/core.py @@ -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