diff --git a/src/risotto/controller.py b/src/risotto/controller.py index 1a829b8a..663c5e5a 100644 --- a/src/risotto/controller.py +++ b/src/risotto/controller.py @@ -3,6 +3,7 @@ from .dispatcher import dispatcher from .context import Context from .remote import remote from .services import list_modules +from .utils import _ class Controller: @@ -15,10 +16,13 @@ class Controller: async def call(self, uri: str, risotto_context: Context, + *args, **kwargs): """ a wrapper to dispatcher's call""" version, module, message = uri.split('.', 2) uri = module + '.' + message + if args: + raise ValueError(_(f'the URI "{uri}" can only be called with positionals arguments')) if module not in self.risotto_modules: return await remote.remove_call(module, version, @@ -32,10 +36,13 @@ class Controller: async def publish(self, uri: str, risotto_context: Context, + *args, **kwargs): """ a wrapper to dispatcher's publish""" version, module, submessage = uri.split('.', 2) version, message = uri.split('.', 1) + if args: + raise ValueError(_(f'the URI "{uri}" can only be published with positionals arguments')) if module not in self.risotto_modules: await remote.remove_call(module, version,