safe_eval: re-raise the same exception type when completing it.
bzr revid: vmt@openerp.com-20130226094446-7c2dw5c5eou0lg8r
This commit is contained in:
@@ -245,6 +245,6 @@ def safe_eval(expr, globals_dict=None, locals_dict=None, mode="eval", nocopy=Fal
|
||||
except Exception, e:
|
||||
import sys
|
||||
exc_info = sys.exc_info()
|
||||
raise ValueError, '"%s" while evaluating\n%r' % (ustr(e), expr), exc_info[2]
|
||||
raise exc_info[0], '"%s" while evaluating\n%r' % (ustr(e), expr), exc_info[2]
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
||||
Reference in New Issue
Block a user