]> git.rkrishnan.org Git - tahoe-lafs/tahoe-lafs.git/commitdiff
interfaces.py: ensure that NoSuchChildError can be converted to str even when it...
authordavid-sarah <david-sarah@jacaranda.org>
Sun, 14 Aug 2011 22:59:59 +0000 (22:59 +0000)
committerdavid-sarah <david-sarah@jacaranda.org>
Sun, 14 Aug 2011 22:59:59 +0000 (22:59 +0000)
src/allmydata/interfaces.py

index 5613e818b38b73d9b4edf50f6808a7b8d6be3e2f..db1c6b522fa5f38b6ca0b7b6b55c01ea2e2c2a96 100644 (file)
@@ -1070,6 +1070,9 @@ class ExistingChildError(Exception):
 
 class NoSuchChildError(Exception):
     """A directory node was asked to fetch a child which does not exist."""
+    def __str__(self):
+        # avoid UnicodeEncodeErrors when converting to str
+        return self.__repr__()
 
 class ChildOfWrongTypeError(Exception):
     """An operation was attempted on a child of the wrong type (file or directory)."""