diff options
| author | Devendra | 2014-04-24 00:16:57 +0530 |
|---|---|---|
| committer | Devendra | 2014-04-24 00:16:57 +0530 |
| commit | 493e29a108255eb3ae3166dc920f40e2f4e5c4c4 (patch) | |
| tree | bce73bc6014e0b10820ebc1393515f7e3e521b88 /common | |
| parent | f7b89bfafae34fa22509c1d1c59d1284ec62c5df (diff) | |
| download | pubnub-python-493e29a108255eb3ae3166dc920f40e2f4e5c4c4.tar.bz2 | |
adding single file for all platforms
Diffstat (limited to 'common')
| -rw-r--r-- | common/PubnubCoreAsync.py | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/common/PubnubCoreAsync.py b/common/PubnubCoreAsync.py index f8e9e68..c9a44c3 100644 --- a/common/PubnubCoreAsync.py +++ b/common/PubnubCoreAsync.py @@ -210,6 +210,19 @@ class PubnubCoreAsync(PubnubBase): self._reset_offline() + def error_callback(response): + ## ERROR ? + if not response or \ + ('message' in response and + response['message'] == 'Forbidden'): + _invoke_error(response['payload'][ + 'channels'], response['message']) + _connect() + return + if 'message' in response: + _invoke_error(err=response['message']) + + def sub_callback(response): ## ERROR ? if not response or \ @@ -257,7 +270,7 @@ class PubnubCoreAsync(PubnubBase): str(self.timetoken) ], "urlparams": {"uuid": self.uuid, "auth": self.auth_key}}, sub_callback, - sub_callback, + error_callback, single=True) ''' except Exception as e: |
