From: Daira Hopwood Date: Thu, 5 Sep 2013 17:06:13 +0000 (+0100) Subject: Sun Aug 14 23:59:59 BST 2011 david-sarah@jacaranda.org X-Git-Url: https://git.rkrishnan.org/provisioning?a=commitdiff_plain;h=522a54be2fb62b1b28c70e5ecd087298062857af;p=tahoe-lafs%2Ftahoe-lafs.git Sun Aug 14 23:59:59 BST 2011 david-sarah@jacaranda.org * interfaces.py: ensure that NoSuchChildError can be converted to str even when it is for a non-ASCII name. fixes #1483 --- diff --git a/src/allmydata/interfaces.py b/src/allmydata/interfaces.py index 29ccd27a..749be281 100644 --- a/src/allmydata/interfaces.py +++ b/src/allmydata/interfaces.py @@ -1103,6 +1103,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)."""