If the data xml contains an eval expression that does not compute,
the convert procedure would throw an exception all the way up. Now,
catch that and only display a warning.
Hopefully, this warning will be fixed to contain more useful info
about its nature.
bzr revid: p_christ@hol.gr-
20080926072827-41i7lihw2i9uaisk
all_timezones=[]
pytz=pytzclass()
idref['pytz'] = pytz
- return eval(a_eval, idref)
+ try:
+ return eval(a_eval, idref)
+ except:
+ logger = netsvc.Logger()
+ logger.notifyChannel("init", netsvc.LOG_WARNING, 'could eval(%s) for %s in %s, please get back and fix it!' % (a_eval,node.getAttribute('name'),context))
+ return ""
if t == 'xml':
def _process(s, idref):
m = re.findall('[^%]%\((.*?)\)[ds]', s)