Attempt to autodetect repo url if repo URL is undefined _or_ is the insecure default. Addresses an issue in 3.6.3 release where autodetect was skipped.

This commit is contained in:
Greg Neagle
2019-10-14 09:05:43 -07:00
parent c2eb49e025
commit ebdefe4fc0

View File

@@ -82,9 +82,10 @@ def guess_repo_url():
def autodetect_repo_url_if_needed():
'''If Munki repo URL is not defined, attempt to discover one. If successful,
record the discovered URL in Munki's preferences.'''
if prefs.pref('SoftwareRepoURL'):
'''If Munki repo URL is not defined, (or is the insecure default) attempt
to discover one. If successful, record the discovered URL in Munki's
preferences.'''
if prefs.pref('SoftwareRepoURL') not in (None, prefs.DEFAULT_INSECURE_REPO_URL):
# SoftwareRepoURL key is defined. exit.
return
all_keys_defined = True