~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/smart/vfs.py

Fix tracebacks caused by 'Permission denied' errors from a smart
        server (bug 278673),
        and refactor client-side smart error handling. (Andrew Bennetts)

Show diffs side-by-side

added added

removed removed

Lines of Context:
72
72
 
73
73
    def do(self, relpath):
74
74
        relpath = self.translate_client_path(relpath)
75
 
        try:
76
 
            backing_bytes = self._backing_transport.get_bytes(relpath)
77
 
        except errors.ReadError:
78
 
            # cannot read the file
79
 
            return request.FailedSmartServerResponse(('ReadError', ))
80
 
        except errors.PermissionDenied:
81
 
            return request.FailedSmartServerResponse(('PermissionDenied',))
 
75
        backing_bytes = self._backing_transport.get_bytes(relpath)
82
76
        return request.SuccessfulSmartServerResponse(('ok',), backing_bytes)
83
77
 
84
78