diff --git a/addons/source-python/packages/source-python/commands/filter.py b/addons/source-python/packages/source-python/commands/filter.py index 2d8f8311a..ece553448 100644 --- a/addons/source-python/packages/source-python/commands/filter.py +++ b/addons/source-python/packages/source-python/commands/filter.py @@ -31,9 +31,9 @@ def __init__(self, callback): # Register the filter self._manager_class.register_filter(self.callback) - def __call__(self, *args): + def __call__(self, *args, **kwargs): """Call the callback.""" - self.callback(*args) + return self.callback(*args, **kwargs) def _unload_instance(self): """Unregister the filter.""" diff --git a/addons/source-python/packages/source-python/hooks/base.py b/addons/source-python/packages/source-python/hooks/base.py index c299a6d92..9a006043b 100644 --- a/addons/source-python/packages/source-python/hooks/base.py +++ b/addons/source-python/packages/source-python/hooks/base.py @@ -83,9 +83,9 @@ def __init__(self, callback): self.callback = callback self._class_instance.append(self.callback) - def __call__(self, *args): + def __call__(self, *args, **kwargs): """Call the callback.""" - self.callback(*args) + return self.callback(*args, **kwargs) def _unload_instance(self): """Unregister the hook."""