Skip to content

Commit c24dfc4

Browse files
author
Jordan Adler
committed
bugfix for issubclass check
1 parent c2e26d4 commit c24dfc4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/future/utils/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -415,7 +415,7 @@ def raise_(tp, value=None, tb=None):
415415
if value is not None:
416416
raise TypeError("instance exception may not have a separate value")
417417
exc = tp
418-
elif not issubclass(tp, Exception):
418+
elif isinstance(tp, type) and not issubclass(tp, Exception):
419419
# If the first object is a class, it becomes the type of the
420420
# exception.
421421
raise TypeError("class must derive from Exception")

0 commit comments

Comments
 (0)