Merge lp://staging/~andidog/bzr-webdav/trunk into lp://staging/bzr-webdav

Proposed by Andreas Sommer
Status: Merged
Merge reported by: Vincent Ladeuil
Merged at revision: not available
Proposed branch: lp://staging/~andidog/bzr-webdav/trunk
Merge into: lp://staging/bzr-webdav
Diff against target: 16 lines (+3/-2)
1 file modified
webdav.py (+3/-2)
To merge this branch: bzr merge lp://staging/~andidog/bzr-webdav/trunk
Reviewer Review Type Date Requested Status
Vincent Ladeuil Approve
Review via email: mp+96339@code.staging.launchpad.net

Description of the change

Fix for change in bzrlib's SSL certificate checking: Parameter ca_certs was added to the Opener class. I added this as keyword argument with default value None, so that the webdav plugin should still work with older Bazaar versions.

See bzr revision "6238.2.22 revid:<email address hidden>" for the change.

To post a comment you must log in.
Revision history for this message
Andreas Sommer (andidog) wrote :

Sorry, in fact it won't work with older versions because I'm also passing that parameter on to the super class.

Revision history for this message
Vincent Ladeuil (vila) wrote :

Thanks for looking into it, but yes, this is most likely unrelated to your push issue. The ca_certs parameter is only relevant for tests (for now).

Revision history for this message
Andreas Sommer (andidog) wrote :

I didn't say this is related to my push issue. Actually I first found out that pushing leads to an exception because of the missing ca_certs parameter (new in the revision I mentioned above). What I posted in the mailing list is something completely different.

I added the ca_certs parameter to __init__ here because the DavOpener class gets assigned to HttpDavTransport._opener_class, which in turn is used as follows (note the construction uses the ca_certs parameter):

class HttpTransport_urllib(http.HttpTransportBase):
    """Python urllib transport for http and https."""

    # In order to debug we have to issue our traces in sync with
    # httplib, which use print :(
    _debuglevel = 0

    _opener_class = Opener

    def __init__(self, base, _from_transport=None, ca_certs=None):
        super(HttpTransport_urllib, self).__init__(
            base, 'urllib', _from_transport=_from_transport)
        if _from_transport is not None:
            self._opener = _from_transport._opener
        else:
            self._opener = self._opener_class(
                report_activity=self._report_activity, ca_certs=ca_certs)

Revision history for this message
Vincent Ladeuil (vila) wrote :

Ooops, damn, will look into this asap :-/

Thanks for the heads-up !

Revision history for this message
Vincent Ladeuil (vila) wrote :

Sorry for the delay, lp:bzr-webdav now contains a moral equivalent of this proposal, thanks again for the heads-up.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches

to all changes: