From 93e50f5e1616004a55614650bd1753888f15a65c Mon Sep 17 00:00:00 2001
From: david-sarah <david-sarah@jacaranda.org>
Date: Sun, 14 Aug 2011 22:59:59 +0000
Subject: [PATCH] interfaces.py: ensure that NoSuchChildError can be converted
 to str even when it is for a non-ASCII name. fixes #1483

---
 src/allmydata/interfaces.py | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/allmydata/interfaces.py b/src/allmydata/interfaces.py
index 5613e818..db1c6b52 100644
--- a/src/allmydata/interfaces.py
+++ b/src/allmydata/interfaces.py
@@ -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)."""
-- 
2.45.2