~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/transport/local.py

  • Committer: Robert Collins
  • Date: 2006-09-29 06:24:03 UTC
  • mto: This revision was merged to the branch mainline in revision 2587.
  • Revision ID: robertc@robertcollins.net-20060929062403-7e8b779181d8766c
``Transport.get`` has had its interface made more clear for ease of use.
Retrieval of a directory must now fail with either 'PathError' at open
time, or raise 'ReadError' on a read. (Robert Collins)

Show diffs side-by-side

added added

removed removed

Lines of Context:
35
35
                            check_legal_path, rmtree)
36
36
from bzrlib.symbol_versioning import warn
37
37
from bzrlib.trace import mutter
38
 
from bzrlib.transport import Transport, Server
 
38
from bzrlib.transport import LateReadError, Transport, Server
39
39
 
40
40
 
41
41
_append_flags = os.O_CREAT | os.O_APPEND | os.O_WRONLY | osutils.O_BINARY
131
131
            path = self._abspath(relpath)
132
132
            return open(path, 'rb')
133
133
        except (IOError, OSError),e:
 
134
            if e.errno == errno.EISDIR:
 
135
                return LateReadError(relpath)
134
136
            self._translate_error(e, path)
135
137
 
136
138
    def put_file(self, relpath, f, mode=None):