diff --git a/platypush/pusher/__init__.py b/platypush/pusher/__init__.py index 2eb174bf2..ba1c0c6a7 100644 --- a/platypush/pusher/__init__.py +++ b/platypush/pusher/__init__.py @@ -142,7 +142,7 @@ class Pusher(object): }) - def push(self, target, action, backend=None, + def send_request(self, target, action, backend=None, timeout=default_response_wait_timeout, **kwargs): """ Sends a message on a backend and optionally waits for an answer. diff --git a/platypush/pusher/__main__.py b/platypush/pusher/__main__.py index 0ab848943..dfb401c3a 100644 --- a/platypush/pusher/__main__.py +++ b/platypush/pusher/__main__.py @@ -12,7 +12,7 @@ def main(args=sys.argv[1:]): print(opts.args) pusher.send_event(target=opts.target, type=opts.event, **opts.args) else: - pusher.push(target=opts.target, action=opts.action, timeout=opts.timeout, **opts.args) + pusher.send_request(target=opts.target, action=opts.action, timeout=opts.timeout, **opts.args) main() diff --git a/tests/test_local.py b/tests/test_local.py index bde24c05e..a0fc158ac 100644 --- a/tests/test_local.py +++ b/tests/test_local.py @@ -52,7 +52,7 @@ class TestLocal(unittest.TestCase): on_response=self.on_response()) logging.info('Sending request') - pusher.push(target=Config.get('device_id'), action='shell.exec', + pusher.send_request(target=Config.get('device_id'), action='shell.exec', cmd='echo ping', timeout=None)