diff options
| author | Devendra | 2014-04-25 03:26:09 +0530 |
|---|---|---|
| committer | Devendra | 2014-04-25 03:26:09 +0530 |
| commit | ad6a453a0f00d20f0668b17b61668cb7fa5ee4e4 (patch) | |
| tree | ad10544d656d6f553d0c8c0a701c72cb55c4224c /Pubnub.py | |
| parent | 98242257846e9276dd83adbea950f83e25a4f2b6 (diff) | |
| download | pubnub-python-ad6a453a0f00d20f0668b17b61668cb7fa5ee4e4.tar.bz2 | |
v1 of console
Diffstat (limited to 'Pubnub.py')
| -rw-r--r-- | Pubnub.py | 10 |
1 files changed, 1 insertions, 9 deletions
@@ -411,7 +411,7 @@ class PubnubBase(object): else: return None - def publish(channel, message, callback=None, error=None): + def publish(self, channel, message, callback=None, error=None): """ #** #* Publish @@ -1037,19 +1037,15 @@ class HTTPClient: else: if latest_sub_callback['callback'] is not None: latest_sub_callback['id'] = 0 - print data try: data = json.loads(data) except ValueError as e: _invoke(latest_sub_callback['error'], {'error': 'json decoding error'}) return - print code if code != 200: - print 'ERROR' _invoke(latest_sub_callback['error'], data) else: - print 'CALLBACK' _invoke(latest_sub_callback['callback'], data) else: try: @@ -1070,22 +1066,18 @@ def _urllib_request_2(url, timeout=320): except urllib2.HTTPError as http_error: resp = http_error except urllib2.URLError as error: - #print error.reason msg = {"message": str(error.reason)} - #print str(msg) return (json.dumps(msg), 0) return (resp.read(), resp.code) def _urllib_request_3(url, timeout=320): - #print(url) try: resp = urllib.request.urlopen(url, timeout=timeout) except (urllib.request.HTTPError, urllib.request.URLError) as http_error: resp = http_error r = resp.read().decode("utf-8") - #print(r) return (r, resp.code) _urllib_request = None |
