Skip to content
Snippets Groups Projects
Commit 06f014b2 authored by Piotr Maślanka's avatar Piotr Maślanka
Browse files

clearer

parent b4310cfa
No related branches found
No related tags found
No related merge requests found
...@@ -45,7 +45,8 @@ class rethrow_as(object): ...@@ -45,7 +45,8 @@ class rethrow_as(object):
# You can also provide just two exceptions # You can also provide just two exceptions
if len(pairs) == 2 and not isinstance(pairs[1], (tuple, list)) \ if len(pairs) == 2 and not isinstance(pairs[1], (tuple, list)) \
and all(issubclass(p, BaseException) for p in pairs): and all(issubclass(p, BaseException) for p in pairs[0]) \
and issubclass(pairs[1], (BaseException, type(None))):
self.mapping = [pairs] self.mapping = [pairs]
else: else:
self.mapping = list(pairs) self.mapping = list(pairs)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment