~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/transport/http.py

Handle URLError without http error code

Show diffs side-by-side

added added

removed removed

Lines of Context:
143
143
        try:
144
144
            return get_url(self.abspath(relpath))
145
145
        except urllib2.URLError, e:
146
 
            if e.code == 404:
 
146
            if getattr(e, 'code', None) == 404:
147
147
                raise NoSuchFile(msg = "Error retrieving %s: %s" 
148
148
                                 % (self.abspath(relpath), str(e)),
149
149
                                 orig_error=e)