[FIX] translate: first element of 'args' should not be None
authorolt@tinyerp.com <>
Mon, 21 Nov 2011 08:17:00 +0000 (09:17 +0100)
committerolt@tinyerp.com <>
Mon, 21 Nov 2011 08:17:00 +0000 (09:17 +0100)
bzr revid: olt@tinyerp.com-20111121081700-3rf3gpcrq2xhe2us

bin/tools/translate.py

index 176484a..b7d8c00 100644 (file)
@@ -135,7 +135,7 @@ class GettextAlias(object):
         
         if not (cr and lang):
             args = frame.f_locals.get('args',False)
-            if args:
+            if args and args[-1] is not None:
                 lang = args[-1].get('lang',False)
                 if frame.f_globals.get('pooler',False):
                     cr = pooler.get_db(frame.f_globals['pooler'].pool_dic.keys()[0]).cursor()