class pytzclass(object):
all_timezones=[]
pytz=pytzclass()
- idref['pytz'] = pytz
+ idref2['pytz'] = pytz
- return eval(a_eval, idref2)
+ try:
- return eval(a_eval, idref)
++ return eval(a_eval, idref2)
+ 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)
while line.startswith('#'):
if line.startswith('#:'):
tmp_tnrs.append( line[2:].strip().split(':') )
+ elif line.startswith('#,') and (line[2:].strip() == 'fuzzy'):
+ fuzzy = True
line = self.lines.pop(0).strip()
+ while not line:
+ # allow empty lines between comments and msgid
+ line = self.lines.pop(0).strip()
if not line.startswith('msgid'):
raise Exception("malformed file: bad line: %s" % line)
source = unquote(line[6:])