Skip to content

Commit

Permalink
Replace exc_info with reraise in adodbapi.adodbapibase
Browse files Browse the repository at this point in the history
  • Loading branch information
Avasam committed Nov 13, 2024
1 parent bbd9416 commit f59d460
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions adodbapi/apibase.py
Original file line number Diff line number Diff line change
Expand Up @@ -552,9 +552,8 @@ def __getitem__(self, key): # used for row[key] type of value access
return self._getValue(
self.rows.columnNames[key.lower()]
) # extension row[columnName] designation
except (KeyError, TypeError):
er, st, tr = sys.exc_info()
raise er(f'No such key as "{key!r}" in {self!r}').with_traceback(tr)
except (KeyError, TypeError) as er:
raise type(er)(f'No such key as "{key!r}" in {self!r}') from er

def __iter__(self):
return iter(self.__next__())
Expand Down

0 comments on commit f59d460

Please sign in to comment.