From 33c4d9fb520836b2fb9bfab16b6c68bc894257f9 Mon Sep 17 00:00:00 2001 From: Fabio Manganiello Date: Wed, 13 Dec 2017 04:21:26 +0100 Subject: [PATCH] s/platypush.response/platypush.message.response/g --- README.md | 2 +- platypush/__init__.py | 6 +++--- platypush/{ => message}/response/__init__.py | 0 platypush/plugins/__init__.py | 2 +- platypush/plugins/light/hue/__init__.py | 2 +- platypush/plugins/music/mpd/__init__.py | 2 +- platypush/plugins/shell/__init__.py | 2 +- platypush/plugins/switch/wemo/__init__.py | 2 +- 8 files changed, 9 insertions(+), 9 deletions(-) rename platypush/{ => message}/response/__init__.py (100%) diff --git a/README.md b/README.md index 906f03296c..a4b7b35998 100644 --- a/README.md +++ b/README.md @@ -112,7 +112,7 @@ The `__init__.py` will look like this: ```python import batman -from platypush.response import Response +from platypush.message.response import Response from .. import LightPlugin diff --git a/platypush/__init__.py b/platypush/__init__.py index 49760fdcd1..8e4be1ef4c 100644 --- a/platypush/__init__.py +++ b/platypush/__init__.py @@ -12,7 +12,8 @@ import yaml from queue import Queue from threading import Thread from getopt import getopt -from .response import Response + +from .message.response import Response __author__ = 'Fabio Manganiello ' __version__ = '0.3.2' @@ -85,8 +86,7 @@ def _exec_func(args, backend=None, retry=True): _init_plugin(module_name, reload=True) _exec_func(args, backend, retry=False) finally: - if backend: - backend.send_msg({ 'response':str(response) }) + if backend: backend.send_msg({ 'response':str(response) }) def on_msg(msg, backend=None): diff --git a/platypush/response/__init__.py b/platypush/message/response/__init__.py similarity index 100% rename from platypush/response/__init__.py rename to platypush/message/response/__init__.py diff --git a/platypush/plugins/__init__.py b/platypush/plugins/__init__.py index bbaacf8504..3747a9cf13 100644 --- a/platypush/plugins/__init__.py +++ b/platypush/plugins/__init__.py @@ -3,7 +3,7 @@ import sys import logging from platypush import get_logging_level -from platypush.response import Response +from platypush.message.response import Response class Plugin(object): def __init__(self, config): diff --git a/platypush/plugins/light/hue/__init__.py b/platypush/plugins/light/hue/__init__.py index a89681ea6f..f8848ceb09 100644 --- a/platypush/plugins/light/hue/__init__.py +++ b/platypush/plugins/light/hue/__init__.py @@ -2,7 +2,7 @@ import logging import time from phue import Bridge -from platypush.response import Response +from platypush.message.response import Response from .. import LightPlugin diff --git a/platypush/plugins/music/mpd/__init__.py b/platypush/plugins/music/mpd/__init__.py index c924073a68..5d23a9fb14 100644 --- a/platypush/plugins/music/mpd/__init__.py +++ b/platypush/plugins/music/mpd/__init__.py @@ -1,6 +1,6 @@ import mpd -from platypush.response import Response +from platypush.message.response import Response from .. import MusicPlugin diff --git a/platypush/plugins/shell/__init__.py b/platypush/plugins/shell/__init__.py index 66ef8c37fc..f0b09a7f2a 100644 --- a/platypush/plugins/shell/__init__.py +++ b/platypush/plugins/shell/__init__.py @@ -1,6 +1,6 @@ import subprocess -from platypush.response import Response +from platypush.message.response import Response from .. import Plugin diff --git a/platypush/plugins/switch/wemo/__init__.py b/platypush/plugins/switch/wemo/__init__.py index 5b5aa0a407..77df816980 100644 --- a/platypush/plugins/switch/wemo/__init__.py +++ b/platypush/plugins/switch/wemo/__init__.py @@ -2,7 +2,7 @@ import logging import json from ouimeaux.environment import Environment, UnknownDevice -from platypush.response import Response +from platypush.message.response import Response from .. import SwitchPlugin