# HG changeset patch
# User Sylvain Thénault <sylvain.thenault@logilab.fr>
# Date 1337072234 -7200
# Node ID 3dcb117fb3b0c7194e317d67b460a23bd986e432
# Parent  a9efb25337da1dfe002943d2301fc9b3bac25e45
[db-api] fix typo leading to crash on client connection (config has no translations). Closes #2357044

diff -r a9efb25337da -r 3dcb117fb3b0 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)