Xavier (Open ERP) has proposed merging 
lp:~openerp-dev/openobject-server/trunk-eval-attr-fail-xmo into 
lp:openobject-server.

Requested reviews:
  OpenERP Core Team (openerp)

For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-server/trunk-eval-attr-fail-xmo/+merge/90263

Stop the world if an @eval blows up in an XML file, instead of printing a 
warning (which may be ignored in the spam of installing new modules) and 
corrupting the value.
-- 
https://code.launchpad.net/~openerp-dev/openobject-server/trunk-eval-attr-fail-xmo/+merge/90263
Your team OpenERP R&D Team is subscribed to branch 
lp:~openerp-dev/openobject-server/trunk-eval-attr-fail-xmo.
=== modified file 'openerp/tools/convert.py'
--- openerp/tools/convert.py	2011-12-13 12:02:25 +0000
+++ openerp/tools/convert.py	2012-01-26 13:47:26 +0000
@@ -129,15 +129,14 @@
                     f_val = f_val[0]
             return f_val
         a_eval = node.get('eval','')
-        idref2 = {}
         if a_eval:
             idref2 = _get_idref(self, cr, uid, f_model, context, idref)
             try:
                 return unsafe_eval(a_eval, idref2)
             except Exception:
-                logger = logging.getLogger('init')
-                logger.warning('could not eval(%s) for %s in %s' % (a_eval, node.get('name'), context), exc_info=True)
-                return ""
+                logging.getLogger('openerp.tools.convert.init').error(
+                    'Could not eval(%s) for %s in %s', a_eval, node.get('name'), context)
+                raise
         if t == 'xml':
             def _process(s, idref):
                 m = re.findall('[^%]%\((.*?)\)[ds]', s)

_______________________________________________
Mailing list: https://launchpad.net/~openerp-dev-gtk
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~openerp-dev-gtk
More help   : https://help.launchpad.net/ListHelp

Reply via email to