summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/processors.py
diff options
context:
space:
mode:
authorGaëtan de Menten <gdementen@gmail.com>2010-02-23 20:41:23 +0000
committerGaëtan de Menten <gdementen@gmail.com>2010-02-23 20:41:23 +0000
commitbe3fc76bb5d8ffdad89f9acbd345c1ea04046383 (patch)
tree3e985ee7cbd9136d9f6689d4e4c5feb7351ef9cf /lib/sqlalchemy/processors.py
parentf0d1a042711429bcac969cf53c442309dbcc0540 (diff)
downloadsqlalchemy-be3fc76bb5d8ffdad89f9acbd345c1ea04046383.tar.gz
rename "error" kwarg to "errors" to be consistent with builtin unicode
conversion functions.
Diffstat (limited to 'lib/sqlalchemy/processors.py')
-rw-r--r--lib/sqlalchemy/processors.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/sqlalchemy/processors.py b/lib/sqlalchemy/processors.py
index 2bf9221b7..4cf6831bd 100644
--- a/lib/sqlalchemy/processors.py
+++ b/lib/sqlalchemy/processors.py
@@ -32,10 +32,10 @@ try:
str_to_datetime, str_to_time, \
str_to_date
- def to_unicode_processor_factory(encoding, error=None):
- # TODO: this is cumbersome
- if error is not None:
- return UnicodeResultProcessor(encoding, error).process
+ def to_unicode_processor_factory(encoding, errors=None):
+ # this is cumbersome but it would be even more so on the C side
+ if errors is not None:
+ return UnicodeResultProcessor(encoding, errors).process
else:
return UnicodeResultProcessor(encoding).process
@@ -43,7 +43,7 @@ try:
return DecimalResultProcessor(target_class).process
except ImportError:
- def to_unicode_processor_factory(encoding, error=None):
+ def to_unicode_processor_factory(encoding, errors=None):
decoder = codecs.getdecoder(encoding)
def process(value):
@@ -54,7 +54,7 @@ except ImportError:
# len part is safe: it is done that way in the normal
# 'xx'.decode(encoding) code path.
# cfr python-source/Python/codecs.c:PyCodec_Decode
- return decoder(value, error)[0]
+ return decoder(value, errors)[0]
return process
def to_decimal_processor_factory(target_class):