/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/transport/http/_pycurl.py

  • Committer: v.ladeuil+lp at free
  • Date: 2006-10-12 07:33:29 UTC
  • mfrom: (2073 +trunk)
  • mto: (2145.1.1 keepalive)
  • mto: This revision was merged to the branch mainline in revision 2146.
  • Revision ID: v.ladeuil+lp@free.fr-20061012073329-854608f3287dcdd1
Merge bzr.dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
184
184
        # handle_response will raise NoSuchFile, etc based on the response code
185
185
        return code, response.handle_response(abspath, code, headers, data)
186
186
 
187
 
    def _raise_curl_connection_error(self, curl):
188
 
        curl_errno = curl.getinfo(pycurl.OS_ERRNO)
189
 
        url = curl.getinfo(pycurl.EFFECTIVE_URL)
190
 
        raise ConnectionError('curl connection error (%s) on %s'
191
 
                              % (os.strerror(curl_errno), url))
192
 
 
193
187
    def _raise_curl_http_error(self, curl, info=None):
194
188
        code = curl.getinfo(pycurl.HTTP_CODE)
195
189
        url = curl.getinfo(pycurl.EFFECTIVE_URL)
226
220
                    e[0], _pycurl_errors.errorcode[e[0]], e, url)
227
221
            if e[0] in (_pycurl_errors.CURLE_COULDNT_RESOLVE_HOST,
228
222
                        _pycurl_errors.CURLE_COULDNT_CONNECT,
 
223
                        _pycurl_errors.CURLE_COULDNT_RESOLVE_PROXY,
229
224
                        _pycurl_errors.CURLE_GOT_NOTHING):
230
 
                self._raise_curl_connection_error(curl)
 
225
                raise ConnectionError('curl connection error (%s)\non %s'
 
226
                              % (e[1], url))
231
227
            # jam 20060713 The code didn't use to re-raise the exception here
232
228
            # but that seemed bogus
233
229
            raise