diff options
author | goodger <goodger@929543f6-e4f2-0310-98a6-ba3bd3dd1d04> | 2008-03-27 15:04:56 +0000 |
---|---|---|
committer | goodger <goodger@929543f6-e4f2-0310-98a6-ba3bd3dd1d04> | 2008-03-27 15:04:56 +0000 |
commit | 66a58049510a0ee498b327d4f8aeb06ac70b4967 (patch) | |
tree | fa9e4784e957bc85c47a7f13f126da042fd63891 | |
parent | 2637834bbb5b29204d408966e8bdedfcd9578c20 (diff) | |
download | docutils-66a58049510a0ee498b327d4f8aeb06ac70b4967.tar.gz |
fixed & improved assertion; thanks to Hans Ulrich Niedermann
git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk/docutils/docutils@5538 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
-rw-r--r-- | core.py | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -53,9 +53,11 @@ class Publisher: """A `docutils.writers.Writer` instance.""" for component in 'reader', 'parser', 'writer': - assert not isinstance(getattr(self, component), StringType), \ - ('passed string as "%s" parameter; use "%s_name" instead' - % (getattr(self, component), component, component)) + assert not isinstance(getattr(self, component), StringType), ( + 'passed string "%s" as "%s" parameter; pass an instance, ' + 'or use the "%s_name" parameter instead (in ' + 'docutils.core.publish_* convenience functions).' + % (getattr(self, component), component, component)) self.source = source """The source of input data, a `docutils.io.Input` instance.""" |