1
Origin: commit, revision id: jelmer@samba.org-20110831101644-wapdg0atc496moap
2
Author: Jelmer Vernooij <jelmer@samba.org>
3
Last-Update: 2011-08-31
4
X-Bzr-Revision-Id: jelmer@samba.org-20110831101644-wapdg0atc496moap
6
=== modified file 'bzrlib/tests/test_transport.py'
7
--- old/bzrlib/tests/test_transport.py 2011-08-15 14:31:55 +0000
8
+++ new/bzrlib/tests/test_transport.py 2011-08-31 10:16:44 +0000
10
self.assertEquals(f.read(), 'foo')
11
self.assertEquals(len(calls), 1, calls)
13
+ def test_missing_directory(self):
14
+ t = self.get_transport('.')
15
+ self.assertRaises(errors.NoSuchFile, t.open_write_stream, 'dir/foo')
18
class TestWin32LocalTransport(tests.TestCase):
21
=== modified file 'bzrlib/transport/local.py'
22
--- old/bzrlib/transport/local.py 2011-08-15 14:31:55 +0000
23
+++ new/bzrlib/transport/local.py 2011-08-31 01:35:15 +0000
25
def open_write_stream(self, relpath, mode=None):
26
"""See Transport.open_write_stream."""
27
abspath = self._abspath(relpath)
28
- handle = osutils.open_file(abspath, 'wb')
30
+ handle = osutils.open_file(abspath, 'wb')
31
+ except (IOError, OSError),e:
32
+ self._translate_error(e, abspath)
35
self._check_mode_and_size(abspath, handle.fileno(), mode)