Browse Source

[FIX] mis builder: Catch exception on ValueError and on NameError

pull/90/head
Adrien Peiffer (ACSONE) 10 years ago
committed by Stéphane Bidoul
parent
commit
659d592e6a
  1. 3
      mis_builder/models/mis_builder.py

3
mis_builder/models/mis_builder.py

@ -29,7 +29,6 @@ import re
import traceback import traceback
import pytz import pytz
from openerp.api import Environment from openerp.api import Environment
from openerp.osv import orm, fields from openerp.osv import orm, fields
from openerp import tools from openerp import tools
@ -578,7 +577,7 @@ class mis_report_instance_period(orm.Model):
kpi_val = None kpi_val = None
kpi_val_rendered = '#DIV/0' kpi_val_rendered = '#DIV/0'
kpi_val_comment += '\n\n%s' % (traceback.format_exc(),) kpi_val_comment += '\n\n%s' % (traceback.format_exc(),)
except NameError:
except (NameError, ValueError):
recompute_queue.append(kpi) recompute_queue.append(kpi)
kpi_val = None kpi_val = None
kpi_val_rendered = '#ERR' kpi_val_rendered = '#ERR'

Loading…
Cancel
Save