summaryrefslogtreecommitdiff
path: root/docutils/io.py
diff options
context:
space:
mode:
authorgoodger <goodger@929543f6-e4f2-0310-98a6-ba3bd3dd1d04>2003-06-08 20:58:58 +0000
committergoodger <goodger@929543f6-e4f2-0310-98a6-ba3bd3dd1d04>2003-06-08 20:58:58 +0000
commitbb2f2713e8cdf461d76b7354dc14525ae733545a (patch)
tree7376ba362380559dbd0b3408f5204a0c5b2cadd8 /docutils/io.py
parent9ade7d7ac8e96945d4d7c51cf3bb3b1f48e8f138 (diff)
downloaddocutils-bb2f2713e8cdf461d76b7354dc14525ae733545a.tar.gz
updated
git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk/docutils@1401 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
Diffstat (limited to 'docutils/io.py')
-rw-r--r--docutils/io.py8
1 files changed, 3 insertions, 5 deletions
diff --git a/docutils/io.py b/docutils/io.py
index 52d500dc7..5eac67f04 100644
--- a/docutils/io.py
+++ b/docutils/io.py
@@ -108,13 +108,11 @@ class Output(TransformSpec):
default_destination_path = None
def __init__(self, settings=None, destination=None, destination_path=None,
- encoding=None):
- encoding, error_handler = (encoding.split(':') + ['strict'])[:2]
-
+ encoding=None, error_handler='strict'):
self.encoding = encoding
"""Text encoding for the output destination."""
- self.error_handler = error_handler
+ self.error_handler = error_handler or 'strict'
"""Text encoding error handler."""
if settings:
@@ -198,7 +196,7 @@ class FileOutput(Output):
"""
def __init__(self, settings=None, destination=None, destination_path=None,
- encoding=None, autoclose=1):
+ encoding=None, error_handler='strict', autoclose=1):
"""
:Parameters:
- `destination`: either a file-like object (which is written