Project

General

Profile

« Previous | Next » 

Revision 3046

xml_func.py: _noCV: Fixed bug where assumed items was an iterator when it's now a list

View differences:

xml_func.py
335 335
            '(see <http://en.wikipedia.org/wiki/Coefficient_of_variation>)')
336 336

  
337 337
def _noCV(items, node):
338
    try: name, value = items.next()
339
    except StopIteration: return None
338
    try: name, value = items.pop() # last entry contains value
339
    except IndexError: return None # input is empty
340 340
    if re.match('^(?i)CV *\d+$', value): raise FormatException(CvException())
341 341
    return value
342 342
funcs['_noCV'] = _noCV

Also available in: Unified diff