[V3 ModLog] Change register_casetypes behavior (#2551)

* Ignore runtime error in register_casetypes

* Fix documentation
This commit is contained in:
Will 2019-04-04 18:59:14 -04:00 committed by GitHub
parent c63d069f69
commit fb722c79be
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -746,7 +746,6 @@ async def register_casetypes(new_types: List[dict]) -> List[CaseType]:
Raises
------
RuntimeError
KeyError
ValueError
AttributeError
@ -761,13 +760,9 @@ async def register_casetypes(new_types: List[dict]) -> List[CaseType]:
try:
ct = await register_casetype(**new_type)
except RuntimeError:
raise
except ValueError:
raise
except AttributeError:
raise
except TypeError:
raise
# We pass here because RuntimeError signifies the case was
# already registered.
pass
else:
type_list.append(ct)
else: