simplyfy some error messages

This commit is contained in:
l_samenv
2020-09-08 13:31:38 +02:00
parent c1ffc160a2
commit 99e32065b1
2 changed files with 9 additions and 3 deletions

View File

@ -138,6 +138,12 @@ def secop_error(exception):
return InternalError(repr(exception))
def fmt_error(exception):
if isinstance(exception, SECoPError):
return str(exception)
return repr(exception)
EXCEPTIONS = dict(
NoSuchModule=NoSuchModuleError,
NoSuchParameter=NoSuchParameterError,