Merge lp:~dobey/ubuntuone-client/httplib-jaunty into lp:ubuntuone-client

Proposed by dobey
Status: Merged
Approved by: Philip Fibiger
Approved revision: 260
Merged at revision: not available
Proposed branch: lp:~dobey/ubuntuone-client/httplib-jaunty
Merge into: lp:ubuntuone-client
Diff against target: 19 lines
1 file modified
ubuntuone/oauthdesktop/auth.py (+6/-3)
To merge this branch: bzr merge lp:~dobey/ubuntuone-client/httplib-jaunty
Reviewer Review Type Date Requested Status
Philip Fibiger (community) Approve
Rick McBride (community) Approve
Review via email: mp+13495@code.launchpad.net

Commit message

Use a try/except to handle Jaunty which lacks _tunnel_host in httplib

To post a comment you must log in.
Revision history for this message
Rick McBride (rmcbride) wrote :

I like it.

review: Approve
Revision history for this message
Philip Fibiger (pfibiger) wrote :

nice. better than abandoning jaunty two weeks before karmic release :)

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'ubuntuone/oauthdesktop/auth.py'
2--- ubuntuone/oauthdesktop/auth.py 2009-10-08 18:57:48 +0000
3+++ ubuntuone/oauthdesktop/auth.py 2009-10-16 19:05:20 +0000
4@@ -55,9 +55,12 @@
5 def _connect_wrapper(self):
6 """Override HTTPSConnection.connect to require certificate checks"""
7 sock = socket.create_connection((self.host, self.port), self.timeout)
8- if self._tunnel_host:
9- self.sock = sock
10- self._tunnel()
11+ try:
12+ if self._tunnel_host:
13+ self.sock = sock
14+ self._tunnel()
15+ except AttributeError:
16+ pass
17 self.sock = ssl.wrap_socket(sock, self.key_file, self.cert_file,
18 cert_reqs=ssl.CERT_REQUIRED,
19 ca_certs="/etc/ssl/certs/ca-certificates.crt")

Subscribers

People subscribed via source and target branches