Project

General

Profile

« Previous | Next » 

Revision 1186

xml_func.py: _alt: Fixed bug where not specifying any item would crash the program instead of raising a SyntaxException

View differences:

lib/xml_func.py
58 58
def _alt(items):
59 59
    items = list(items)
60 60
    items.sort()
61
    return items[0][1] # value of lowest-numbered item
61
    try: return items[0][1] # value of lowest-numbered item
62
    except IndexError, e: raise SyntaxException(e)
62 63
funcs['_alt'] = _alt
63 64

  
64 65
def _merge(items):

Also available in: Unified diff