mirror of
https://github.com/munki/munki.git
synced 2026-04-23 04:59:17 -05:00
Minor clean-up; removed custom argument for updatecheck.getItemDetail, unusued self.apple_md variable removed from appleupdates
This commit is contained in:
@@ -175,7 +175,6 @@ class AppleUpdates(object):
|
||||
self._update_list_cache = None
|
||||
|
||||
# apple_update_metadata support
|
||||
self.apple_md = {}
|
||||
self.client_id = CLIENT_ID
|
||||
|
||||
def _ResetMunkiStatusAndDisplayMessage(self, message):
|
||||
@@ -834,13 +833,13 @@ class AppleUpdates(object):
|
||||
if apple_updates:
|
||||
if not munkicommon.pref('AppleSoftwareUpdatesOnly'):
|
||||
# Gather available apple_update_metadata
|
||||
cataloglist, self.apple_md = \
|
||||
cataloglist = \
|
||||
updatecheck.getAppleUpdateMetaData(self.client_id)
|
||||
for item in apple_updates:
|
||||
# Find matching metadata item
|
||||
metadata_item = updatecheck.getItemDetail(
|
||||
item['productKey'], cataloglist,
|
||||
apple_update_metadata=True)
|
||||
vers='apple_update_metadata')
|
||||
if metadata_item:
|
||||
munkicommon.display_debug1(
|
||||
'Processing metadata for %s, %s...'
|
||||
|
||||
@@ -944,7 +944,7 @@ def trimVersionString(version_string):
|
||||
return '.'.join(version_parts)
|
||||
|
||||
|
||||
def getItemDetail(name, cataloglist, vers='', apple_update_metadata=False):
|
||||
def getItemDetail(name, cataloglist, vers=''):
|
||||
"""Searches the catalogs in list for an item matching the given name.
|
||||
|
||||
If no version is supplied, but the version is appended to the name
|
||||
@@ -957,7 +957,7 @@ def getItemDetail(name, cataloglist, vers='', apple_update_metadata=False):
|
||||
return cmp(munkicommon.MunkiLooseVersion(b),
|
||||
munkicommon.MunkiLooseVersion(a))
|
||||
|
||||
if apple_update_metadata:
|
||||
if vers == 'apple_update_metadata':
|
||||
vers = 'latest'
|
||||
else:
|
||||
(name, includedversion) = nameAndVersion(name)
|
||||
@@ -3140,7 +3140,7 @@ def getAppleUpdateMetaData(client_id=''):
|
||||
cataloglist = manifestdata.get('catalogs')
|
||||
if cataloglist:
|
||||
getCatalogs(cataloglist)
|
||||
return cataloglist, CATALOG
|
||||
return cataloglist
|
||||
|
||||
|
||||
def main():
|
||||
|
||||
Reference in New Issue
Block a user