ooiservices/app/uframe/assetController.py
def convert_water_depth(depth):
    """
    uframe returns the value and units in one string, this method splits out
    the value from the unit and returns a dict with the appropriate values.
    """
    d = {}
    try:
        if len(depth.split()) == 2:
            value = depth.split()[0]
            unit = depth.split()[1]
            d['value'] = float(value)
            d['unit'] = str(unit)
            return d
        else:
            no_alpha = re.sub("[^0-9]", "", depth)
            d['value'] = float(no_alpha)
            d['unit'] = "m"
            return d
    except ValueError as ve:
        return {'message': 'Conversion Error! %s' % ve,
                'input': depth}

    uframe returns the value and units in one string, this method splits out
    the value from the unit and returns a dict with the appropriate values.
    
uframe returns the value and units in one string, this method splits out
the value from the unit and returns a dict with the appropriate values.
uframe returns the value and units in one string this method splits out the value from the unit and returns a dict with the appropriate values .
def convert_water_depth(depth):
    d = {}
    try:
        if len(depth.split()) == 2:
            value = depth.split()[0]
            unit = depth.split()[1]
            d['value'] = float(value)
            d['unit'] = str(unit)
            return d
        else:
            no_alpha = re.sub("[^0-9]", "", depth)
            d['value'] = float(no_alpha)
            d['unit'] = "m"
            return d
    except ValueError as ve:
        return {'message': 'Conversion Error! %s' % ve,
                'input': depth}
def convert_water_depth ( depth ) : d = { } try : if len ( depth . split ( ) ) == 2 : value = depth . split ( ) [ 0 ] unit = depth . split ( ) [ 1 ] d [ 'value' ] = float ( value ) d [ 'unit' ] = str ( unit ) return d else : no_alpha = re . sub ( "[^0-9]" , "" , depth ) d [ 'value' ] = float ( no_alpha ) d [ 'unit' ] = "m" return d except ValueError as ve : return { 'message' : 'Conversion Error! %s' % ve , 'input' : depth }
uframe returns the value and units in one string, this method splits out
the value from the unit and returns a dict with the appropriate values.
uframe returns the value and units in one string this method splits out the value from the unit and returns a dict with the appropriate values .
"""
    uframe returns the value and units in one string, this method splits out
    the value from the unit and returns a dict with the appropriate values.
    """
depth