~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/transport/http.py

[merge] robert

Show diffs side-by-side

added added

removed removed

Lines of Context:
74
74
        """Return the full url to the given relative path.
75
75
        This can be supplied with a string or a list
76
76
        """
 
77
        assert isinstance(relpath, basestring)
77
78
        if isinstance(relpath, basestring):
78
79
            relpath_parts = relpath.split('/')
79
80
        else:
125
126
            f.read()
126
127
            f.close()
127
128
            return True
128
 
        except BzrError:
129
 
            return False
130
 
        except urllib2.URLError:
131
 
            return False
 
129
        except urllib2.URLError, e:
 
130
            if e.code == 404:
 
131
                return False
 
132
            raise
132
133
        except IOError, e:
133
134
            if e.errno == errno.ENOENT:
134
135
                return False
141
142
        """
142
143
        try:
143
144
            return get_url(self.abspath(relpath))
144
 
        except (BzrError, urllib2.URLError, IOError), e:
 
145
        except urllib2.URLError, e:
 
146
            if e.code == 404:
 
147
                raise NoSuchFile(msg = "Error retrieving %s: %s" 
 
148
                                 % (self.abspath(relpath), str(e)),
 
149
                                 orig_error=e)
 
150
            raise
 
151
        except (BzrError, IOError), e:
145
152
            raise NoSuchFile(msg = "Error retrieving %s: %s" 
146
153
                             % (self.abspath(relpath), str(e)),
147
154
                             orig_error=e)