Skip to content

Commit 31eceba

Browse files
committed
Format args so they can be read
1 parent cdc66aa commit 31eceba

File tree

1 file changed

+30
-9
lines changed

1 file changed

+30
-9
lines changed

pusher/pusher_client.py

Lines changed: 30 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -36,16 +36,38 @@
3636

3737
class PusherClient(Client):
3838
def __init__(
39-
self, app_id, key, secret, ssl=True,
40-
host=None, port=None,
41-
timeout=5, cluster=None,
39+
self,
40+
app_id,
41+
key,
42+
secret,
43+
ssl=True,
44+
host=None,
45+
port=None,
46+
timeout=5,
47+
cluster=None,
4248
encryption_master_key=None,
43-
json_encoder=None, json_decoder=None,
44-
backend=None, **backend_options):
49+
encryption_master_key_base64=None,
50+
json_encoder=None,
51+
json_decoder=None,
52+
backend=None,
53+
**backend_options):
54+
55+
parsed_master_key = parse_master_key(encryption_master_key, encryption_master_key_base64)
56+
4557
super(PusherClient, self).__init__(
46-
app_id, key, secret, ssl, host, port, timeout, cluster,
47-
encryption_master_key, json_encoder, json_decoder,
48-
backend, **backend_options)
58+
app_id,
59+
key,
60+
secret,
61+
ssl,
62+
host,
63+
port,
64+
timeout,
65+
cluster,
66+
parsed_master_key,
67+
json_encoder,
68+
json_decoder,
69+
backend,
70+
**backend_options)
4971

5072
if host:
5173
self._host = ensure_text(host, "host")
@@ -112,7 +134,6 @@ def trigger_batch(self, batch=[], already_encoded=False):
112134
"""
113135
if not already_encoded:
114136
for event in batch:
115-
116137
validate_channel(event['channel'])
117138

118139
event_name = ensure_text(event['name'], "event_name")

0 commit comments

Comments
 (0)