(user_info)
return antenna
Return string with the antenna model
Return string with the antenna model
Return string with the antenna model
def get_antenna_model(user_info):
    """Return string with the antenna model"""
    antenna_info = user_info['setup']['antenna']
    antenna_type = antenna_info.get('type')

    if (antenna_type == 'dish' or antenna_info['label'] == 'custom'):
        dish_size = antenna_info['size']
        if (dish_size >= 100):
            antenna = "{:g}m dish".format(dish_size / 100)
        else:
            antenna = "{:g}cm dish".format(dish_size)
    else:
        return antenna_info['label']

    return antenna
def get_antenna_model ( user_info ) : antenna_info = user_info [ 'setup' ] [ 'antenna' ] antenna_type = antenna_info . get ( 'type' ) if ( antenna_type == 'dish' or antenna_info [ 'label' ] == 'custom' ) : dish_size = antenna_info [ 'size' ] if ( dish_size >= 100 ) : antenna = "{:g}m dish" . format ( dish_size / 100 ) else : antenna = "{:g}cm dish" . format ( dish_size ) else : return antenna_info [ 'label' ] return antenna