~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/transport/memory.py

  • Committer: Aaron Bentley
  • Date: 2007-07-17 13:27:14 UTC
  • mfrom: (2624 +trunk)
  • mto: This revision was merged to the branch mainline in revision 2631.
  • Revision ID: abentley@panoramicfeedback.com-20070717132714-tmzx9khmg9501k51
Merge from bzr.dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
29
29
 
30
30
from bzrlib.errors import TransportError, NoSuchFile, FileExists, LockError
31
31
from bzrlib.trace import mutter
32
 
from bzrlib.transport import (Transport, register_transport, Server)
 
32
from bzrlib.transport import (
 
33
    LateReadError,
 
34
    register_transport,
 
35
    Server,
 
36
    Transport,
 
37
    )
33
38
import bzrlib.urlutils as urlutils
34
39
 
35
40
 
121
126
        """See Transport.get()."""
122
127
        _abspath = self._abspath(relpath)
123
128
        if not _abspath in self._files:
124
 
            raise NoSuchFile(relpath)
 
129
            if _abspath in self._dirs:
 
130
                return LateReadError(relpath)
 
131
            else:
 
132
                raise NoSuchFile(relpath)
125
133
        return StringIO(self._files[_abspath][0])
126
134
 
127
135
    def put_file(self, relpath, f, mode=None):