summaryrefslogtreecommitdiff
path: root/docutils/io.py
diff options
context:
space:
mode:
authorgoodger <goodger@929543f6-e4f2-0310-98a6-ba3bd3dd1d04>2005-07-03 15:02:15 +0000
committergoodger <goodger@929543f6-e4f2-0310-98a6-ba3bd3dd1d04>2005-07-03 15:02:15 +0000
commit08851a456dbf5f4b731252e80d64c803e9b4257f (patch)
tree8e92e2a47c6eab69d249cb3b76f512740da3458d /docutils/io.py
parentda694cfd8f275688b7b4bdac01c6b3691dbf3b41 (diff)
downloaddocutils-08851a456dbf5f4b731252e80d64c803e9b4257f.tar.gz
clarified assertion message
git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk/docutils@3654 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
Diffstat (limited to 'docutils/io.py')
-rw-r--r--docutils/io.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/docutils/io.py b/docutils/io.py
index 91b70377e..5a6672e15 100644
--- a/docutils/io.py
+++ b/docutils/io.py
@@ -149,7 +149,9 @@ class Output(TransformSpec):
def encode(self, data):
if self.encoding and self.encoding.lower() == 'unicode':
- assert isinstance(data, UnicodeType), 'no unicode output'
+ assert isinstance(data, UnicodeType), (
+ 'the encoding given is "unicode" but the output is not '
+ 'a Unicode string')
return data
if not isinstance(data, UnicodeType):
# Non-unicode (e.g. binary) output.