Merge lp:~cjwatson/python-jujuclient/websocket-client-compat into lp:python-jujuclient

Proposed by Colin Watson
Status: Merged
Merged at revision: 99
Proposed branch: lp:~cjwatson/python-jujuclient/websocket-client-compat
Merge into: lp:python-jujuclient
Diff against target: 14 lines (+4/-0)
1 file modified
jujuclient/connector.py (+4/-0)
To merge this branch: bzr merge lp:~cjwatson/python-jujuclient/websocket-client-compat
Reviewer Review Type Date Requested Status
David Britton (community) Approve
Review via email: [email protected]

Commit message

Work around SSL option handling bug in some versions of websocket-client.

Description of the change

This works around https://github.com/websocket-client/websocket-client/issues/334, which was broken in 0.44.0 and maybe also 0.43.0, and fixed in 0.45.0.

Unfortunately 0.44.0 is what's in bionic, so at the moment python-jujuclient is broken out of the box in bionic. I think SRUing this patch there would be a good idea.

To post a comment you must log in.
Revision history for this message
David Britton (dpb) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'jujuclient/connector.py'
2--- jujuclient/connector.py 2016-12-08 17:28:26 +0000
3+++ jujuclient/connector.py 2018-06-06 08:36:35 +0000
4@@ -103,6 +103,10 @@
5 sslopt = {'ssl_version': SSL_VERSION}
6 if cert_path:
7 sslopt['ca_certs'] = cert_path
8+ # Work around
9+ # https://github.com/websocket-client/websocket-client/issues/334
10+ # by setting the old option as well.
11+ sslopt['ca_cert'] = cert_path
12 # ssl.match_hostname is broken for us, need to disable per
13 # https://github.com/liris/websocket-client/issues/105
14 # when that's available, we can just selectively disable

Subscribers

People subscribed via source and target branches

to all changes: