~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

Merge bzr.dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
72
72
                    e.errno, errno.errorcode.get(e.errno), path)
73
73
                if e.errno == errno.ENOENT:
74
74
                    raise NoSuchFile(path, extra=e)
75
 
            raise ConnectionError(msg = "Error retrieving %s: %s" 
76
 
                             % (self.abspath(relpath), str(e)),
77
 
                             orig_error=e)
 
75
            raise ConnectionError(msg = "Error retrieving %s: %s"
 
76
                                  % (self.abspath(relpath), str(e)),
 
77
                                  orig_error=e)
78
78
 
79
79
    def _get_url_impl(self, url, method, ranges, tail_amount=0):
80
80
        """Actually pass get request into urllib
113
113
            f.read()
114
114
            f.close()
115
115
            return True
 
116
        except urllib2.HTTPError, e:
 
117
            mutter('url error code: %s, for has url: %r', e.code, abspath)
 
118
            if e.code == 404:
 
119
                return False
 
120
            raise
116
121
        except urllib2.URLError, e:
117
 
            mutter('url error code: %s for has url: %r', e.code, abspath)
118
 
            if e.code == 404:
119
 
                return False
 
122
            mutter('url error: %s, for has url: %r', e.reason, abspath)
120
123
            raise
121
124
        except IOError, e:
122
125
            mutter('io error: %s %s for has url: %r',