diff --git a/platypush/plugins/__init__.py b/platypush/plugins/__init__.py index 58adfebc68..0a80819115 100644 --- a/platypush/plugins/__init__.py +++ b/platypush/plugins/__init__.py @@ -14,6 +14,9 @@ def action(f): try: output = f(*args, **kwargs) + if output and isinstance(output, Response): + errors = output.errors + output = output.output except Exception as e: if isinstance(args[0], Plugin): args[0].logger.exception(e) diff --git a/platypush/plugins/video/omxplayer.py b/platypush/plugins/video/omxplayer.py index 4ac24b26d2..a2d796a012 100644 --- a/platypush/plugins/video/omxplayer.py +++ b/platypush/plugins/video/omxplayer.py @@ -327,19 +327,16 @@ class VideoOmxplayerPlugin(Plugin): redis.send_message(msg) - @action def on_play(self): def _f(player): self.send_message(VideoPlayEvent(video=self.player.get_source())) return _f - @action def on_pause(self): def _f(player): self.send_message(VideoPauseEvent(video=self.player.get_source())) return _f - @action def on_stop(self): def _f(player): self.send_message(VideoStopEvent())