Skip to content

Commit a4f0145

Browse files
Jordan AdlerEC2 Default User
Jordan Adler
authored and
EC2 Default User
committed
bugfix for issubclass check
1 parent edc6b2b commit a4f0145

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)