summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/ext/sqlsoup.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2007-02-04 20:11:28 +0000
committerMike Bayer <mike_mp@zzzcomputing.com>2007-02-04 20:11:28 +0000
commit78d610da91036100a6f5c84b347e703bcc37c18c (patch)
treeb7dedd367c8c1c8b1f1089455277b43d00fdd01b /lib/sqlalchemy/ext/sqlsoup.py
parentfb1c544e81338ed9a33d0a6e8c1a18d6539a6d88 (diff)
downloadsqlalchemy-78d610da91036100a6f5c84b347e703bcc37c18c.tar.gz
added 'ascii' as default encoding in case getdefaultlocale()[1] comes up with None (see [ticket:457])
Diffstat (limited to 'lib/sqlalchemy/ext/sqlsoup.py')
-rw-r--r--lib/sqlalchemy/ext/sqlsoup.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/sqlalchemy/ext/sqlsoup.py b/lib/sqlalchemy/ext/sqlsoup.py
index 0f644b02f..5fb42df23 100644
--- a/lib/sqlalchemy/ext/sqlsoup.py
+++ b/lib/sqlalchemy/ext/sqlsoup.py
@@ -395,7 +395,7 @@ def class_for_table(selectable, **mapper_kwargs):
return cmp(t1, t2)
def __repr__(self):
import locale
- encoding = locale.getdefaultlocale()[1]
+ encoding = locale.getdefaultlocale()[1] or 'ascii'
L = []
for k in self.__class__.c.keys():
value = getattr(self, k, '')