Fix for empty managed_installs or removals when printing available updates.

git-svn-id: http://munki.googlecode.com/svn/trunk@1240 a4e17f2e-e282-11dd-95e1-755cbddbdd66
This commit is contained in:
Greg Neagle
2011-07-20 04:18:02 +00:00
parent 1962307e3a
commit f1a6760616
+2 -2
View File
@@ -3011,7 +3011,7 @@ def check(client_id='', localmanifestpath=None):
if installcount:
munkicommon.display_info(
'The following items will be installed or upgraded:')
for item in installinfo['managed_installs']:
for item in installinfo.get('managed_installs', []):
if item.get('installer_item'):
munkicommon.display_info(' + %s-%s' %
(item.get('name',''),
@@ -3028,7 +3028,7 @@ def check(client_id='', localmanifestpath=None):
if removalcount:
munkicommon.display_info('The following items will be removed:')
for item in installinfo['removals']:
for item in installinfo.get('removals', []):
if item.get('installed'):
munkicommon.display_info(' - %s' % item.get('name'))
if item.get('RestartAction') == 'RequireRestart' or \