import requests


def return_package_task(task_id):
    """Returns the content of an iControl LX task"""
    task_url = 'http://localhost:8100/mgmt/shared/iapp/package-management-tasks/' + task_id
    response = requests.get(task_url, auth=('admin', ''))
    if response.status_code < 400:
        response_json = response.json()
        if 'queryResponse' in response_json:
            return response_json['queryResponse']
        return response_json
    return False