mirror of
https://github.com/munki/munki.git
synced 2026-05-03 19:10:21 -05:00
Merge branch 'issue814fix' into Munki3dev
This commit is contained in:
@@ -460,15 +460,22 @@ def get_primary_manifest_catalogs(client_id='', force_refresh=False):
|
||||
Returns:
|
||||
cataloglist: list of catalogs from primary manifest
|
||||
"""
|
||||
manifest = None
|
||||
cataloglist = []
|
||||
if (force_refresh or
|
||||
manifestutils.PRIMARY_MANIFEST_TAG
|
||||
not in manifestutils.manifests()):
|
||||
# Fetch manifest from repo
|
||||
manifest = manifestutils.get_primary_manifest(client_id)
|
||||
try:
|
||||
manifest = manifestutils.get_primary_manifest(client_id)
|
||||
except manifestutils.ManifestException:
|
||||
# can't get "fresh" manifest, fall through and try for cached
|
||||
pass
|
||||
# set force_refresh = True so we'll also download any missing catalogs
|
||||
force_refresh = True
|
||||
else:
|
||||
|
||||
if (not manifest and
|
||||
manifestutils.PRIMARY_MANIFEST_TAG in manifestutils.manifests()):
|
||||
# Use cached manifest if available
|
||||
manifest_dir = os.path.join(
|
||||
prefs.pref('ManagedInstallDir'), 'manifests')
|
||||
|
||||
Reference in New Issue
Block a user