

def get_catalog():
    "\n    .. versionadded:: 2016.3.0\n\n    Get the current catalog being used for update lookups. Will return a url if\n    a custom catalog has been specified. Otherwise the word 'Default' will be\n    returned\n\n    :return: The catalog being used for update lookups\n    :rtype: str\n\n    CLI Example:\n\n    .. code-block:: bash\n\n        salt '*' softwareupdates.get_catalog\n    "
    cmd = ['defaults', 'read', '/Library/Preferences/com.apple.SoftwareUpdate.plist']
    out = salt.utils.mac_utils.execute_return_result(cmd)
    if ('AppleCatalogURL' in out):
        cmd.append('AppleCatalogURL')
        out = salt.utils.mac_utils.execute_return_result(cmd)
        return out
    elif ('CatalogURL' in out):
        cmd.append('CatalogURL')
        out = salt.utils.mac_utils.execute_return_result(cmd)
        return out
    else:
        return 'Default'

dataset/ETHPy150Open saltstack/salt/salt/modules/mac_softwareupdate.py get_catalog/original