raise if a 'publish' function failed
This commit is contained in:
parent
867de5f56e
commit
e58c61b76a
|
@ -320,7 +320,6 @@ class Dispatcher(register.RegisterDispatcher,
|
|||
module_name = function.__module__.split('.')[-2]
|
||||
function_name = function.__name__
|
||||
info_msg = _(f'in module {module_name}.{function_name}')
|
||||
try:
|
||||
# build argument for this function
|
||||
if risotto_context.type == 'rpc':
|
||||
kw = config_arguments
|
||||
|
@ -334,19 +333,6 @@ class Dispatcher(register.RegisterDispatcher,
|
|||
|
||||
kw['risotto_context'] = risotto_context
|
||||
returns = await function(self.injected_self[function_obj['module']], **kw)
|
||||
except CallError as err:
|
||||
if risotto_context.type == 'rpc':
|
||||
raise err
|
||||
continue
|
||||
except Exception as err:
|
||||
if risotto_context.type == 'rpc':
|
||||
raise err
|
||||
if get_config().get('global').get('debug'):
|
||||
print_exc()
|
||||
await log.error_msg(risotto_context,
|
||||
kwargs,
|
||||
err)
|
||||
continue
|
||||
else:
|
||||
if risotto_context.type == 'rpc':
|
||||
# valid returns
|
||||
|
|
Loading…
Reference in New Issue