[db-api] fix typo leading to crash on client connection (config has no translations). Closes #2357044
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Tue, 15 May 2012 10:57:14 +0200
changeset 8404 3dcb117fb3b0
parent 8401 a9efb25337da
child 8408 41461b2e9854
[db-api] fix typo leading to crash on client connection (config has no translations). Closes #2357044
dbapi.py
--- 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)