Skip to content

Commit 845e8a0

Browse files
committed
Merge pull request #62 from opcodeltd/gae-backend-fix
GAE Backend loading issues
2 parents 7ed36a7 + 07bdccf commit 845e8a0

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

pusher/pusher.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
division)
55
from pusher.http import GET, POST, Request, request_method
66
from pusher.signature import sign, verify
7-
from pusher.requests import RequestsBackend
87
from pusher.util import ensure_text, validate_channel, validate_socket_id, app_id_re, pusher_url_re, channel_name_re
98

109
import collections
@@ -37,7 +36,12 @@ class Pusher(object):
3736
:param backend_options: additional backend
3837
"""
3938
def __init__(self, app_id, key, secret, ssl=True, host=None, port=None, timeout=5, cluster=None,
40-
json_encoder=None, json_decoder=None, backend=RequestsBackend, **backend_options):
39+
json_encoder=None, json_decoder=None, backend=None, **backend_options):
40+
41+
if backend is None:
42+
from pusher.requests import RequestsBackend
43+
backend = RequestsBackend
44+
4145
self._app_id = ensure_text(app_id, "app_id")
4246
if not app_id_re.match(self._app_id):
4347
raise ValueError("Invalid app id")

0 commit comments

Comments
 (0)