Rev 596: Convert not implemented errors. in file:///data/jelmer/bzr-svn/revprops/
Jelmer Vernooij
jelmer at samba.org
Thu Dec 6 19:18:13 GMT 2007
At file:///data/jelmer/bzr-svn/revprops/
------------------------------------------------------------
revno: 596
revision-id:jelmer at samba.org-20071206191812-4qah8eg11d0uae4a
parent: jelmer at samba.org-20071206183620-il1o1alijnh1iwpx
committer: Jelmer Vernooij <jelmer at samba.org>
branch nick: revprops
timestamp: Thu 2007-12-06 20:18:12 +0100
message:
Convert not implemented errors.
modified:
errors.py errors.py-20061226172623-w1sbj8ynpo0eojqp-1
tests/test_errors.py test_errors.py-20070129114605-ban03f32t6ja14ez-1
=== modified file 'errors.py'
--- a/errors.py 2007-11-26 11:32:01 +0000
+++ b/errors.py 2007-12-06 19:18:12 +0000
@@ -80,6 +80,8 @@
return UnexpectedEndOfContainerError()
elif num == svn.core.SVN_ERR_RA_SVN_MALFORMED_DATA:
return TransportError("Malformed data", msg)
+ elif num == svn.core.SVN_ERR_RA_NOT_IMPLEMENTED:
+ return NotImplementedError("Function not implemented in remote server")
elif num == SVN_ERR_UNKNOWN_HOSTNAME:
return ConnectionError(msg=msg)
elif num > 0 and num < 1000:
=== modified file 'tests/test_errors.py'
--- a/tests/test_errors.py 2007-11-01 01:33:04 +0000
+++ b/tests/test_errors.py 2007-12-06 19:18:12 +0000
@@ -66,6 +66,9 @@
def test_convert_unknown_hostname(self):
self.assertIsInstance(convert_error(SubversionException("Unknown hostname 'bla'", SVN_ERR_UNKNOWN_HOSTNAME)), ConnectionError)
+ def test_not_implemented(self):
+ self.assertIsInstance(convert_error(SubversionException("Remote server doesn't support ...", svn.core.SVN_ERR_RA_NOT_IMPLEMENTED)), NotImplementedError)
+
def test_decorator_nothrow(self):
@convert_svn_error
def test_nothrow(foo):
More information about the bazaar-commits
mailing list