Skip to content

Commit

Permalink
Merge pull request #28 from wtfrank/fix-websockets
Browse files Browse the repository at this point in the history
Fix regression with recent websocket-client - tested with 0.37.0 and 0.56.0
  • Loading branch information
tedivm authored Jun 21, 2019
2 parents 19b81b5 + c01f03a commit 9ffbca7
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions screepsapi/screepsapi.py
Original file line number Diff line number Diff line change
Expand Up @@ -382,10 +382,10 @@ def connect(self):
url = 'wss://screeps.com/ptr/socket/websocket'

self.ws = websocket.WebSocketApp(url=url,
on_message=self.on_message,
on_error=self.on_error,
on_close=self.on_close,
on_open=self.on_open)
on_message=lambda ws, message: self.on_message(ws,message),
on_error=lambda ws, error: self.on_error(ws,error),
on_close=lambda ws: self.on_close(ws),
on_open=lambda ws: self.on_open(ws))

ssl_defaults = ssl.get_default_verify_paths()
sslopt_ca_certs = {'ca_certs': ssl_defaults.cafile}
Expand Down

0 comments on commit 9ffbca7

Please sign in to comment.