[db-api] fix typo leading to crash on client connection (config has no translations). Closes #2357044
--- a/dbapi.py Tue Apr 17 12:28:51 2012 +0200
+++ b/dbapi.py Tue May 15 10:57:14 2012 +0200
@@ -287,12 +287,11 @@
def __init__(self, vreg, session=None):
super(DBAPIRequest, self).__init__(vreg)
#: 'language' => translation_function() mapping
- self.translation = {}
try:
# no vreg or config which doesn't handle translations
self.translations = vreg.config.translations
except AttributeError:
- pass
+ self.translations = {}
#: Request language identifier eg: 'en'
self.lang = None
self.set_default_language(vreg)