From f59d460a640675873c78ff5b41bcedb1783a921c Mon Sep 17 00:00:00 2001 From: Avasam Date: Wed, 13 Nov 2024 14:40:14 -0500 Subject: [PATCH] Replace exc_info with reraise in adodbapi.adodbapibase --- adodbapi/apibase.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/adodbapi/apibase.py b/adodbapi/apibase.py index 749c378d3..1f37b8a1e 100644 --- a/adodbapi/apibase.py +++ b/adodbapi/apibase.py @@ -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__())