Project

General

Profile

« Previous | Next » 

Revision 1470

xml_func.py: _units: default units attr renamed to default to clarify that it's not the units you're converting to

View differences:

xml_func.py
162 162
    items = dict(conv_items(str, items))
163 163
    try: value = items['value']
164 164
    except KeyError: return None # input is empty
165
    default_units = items.get('units', None)
165
    default_units = items.get('default', None)
166 166
    # DB unit conversion isn't ready yet, so just return number
167 167
    try: return units.cleanup_units(value, default_units).split(' ')[0]
168 168
    except units.MissingUnitsException, e: raise SyntaxException(e)

Also available in: Unified diff