Skip to content

Commit 94f28aa

Browse files
committed
concurrency: collapse nested multiexceptions in class name - support generating
1 parent f6434ad commit 94f28aa

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

easypy/concurrency.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,9 @@ class MultiExceptionMeta(type):
179179
def __getitem__(cls, exception_type):
180180
if exception_type is BaseException:
181181
return MultiException
182+
elif isinstance(exception_type, list):
183+
[exception_type] = exception_type
184+
return cls[cls[exception_type]]
182185

183186
assert isinstance(exception_type, type), "Must use an Exception type"
184187
assert issubclass(exception_type, BaseException), "Must inherit for BaseException"

0 commit comments

Comments
 (0)