Skip to content

Commit 65c810a

Browse files
committed
all together now?
1 parent 92f9def commit 65c810a

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

flask_jwt_extended/config.py

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import datetime
22
from warnings import warn
3-
from six import reraise
4-
import sys
3+
from six import raise_from
54

65
# In Python 2.7 collections.abc is a part of the collections module.
76
try:
@@ -197,8 +196,7 @@ def access_expires(self):
197196
err = (
198197
"must be able to add JWT_ACCESS_TOKEN_EXPIRES to datetime.datetime"
199198
)
200-
traceback = sys.exc_info()[2]
201-
reraise(RuntimeError, err, traceback)
199+
raise_from(RuntimeError(err), e)
202200
return delta
203201

204202
@property
@@ -213,8 +211,7 @@ def refresh_expires(self):
213211
err = (
214212
"must be able to add JWT_REFRESH_TOKEN_EXPIRES to datetime.datetime"
215213
)
216-
traceback = sys.exc_info()[2]
217-
reraise(RuntimeError, err, traceback)
214+
raise_from(RuntimeError(err), e)
218215
return delta
219216

220217
@property

0 commit comments

Comments
 (0)