mirror of
https://github.com/munki/munki.git
synced 2026-04-26 06:48:57 -05:00
Fix unhandled exception caused by installWithInfo returning just the needToRestart instead of the expected tuple in some cases.
git-svn-id: http://munki.googlecode.com/svn/trunk@1068 a4e17f2e-e282-11dd-95e1-755cbddbdd66
This commit is contained in:
@@ -478,7 +478,7 @@ def installWithInfo(dirpath, installlist, only_forced=False, applesus=False):
|
||||
"Skipping forced install of %s" % item['name'])
|
||||
continue
|
||||
if munkicommon.stopRequested():
|
||||
return restartflag
|
||||
return restartflag, skipped_installs
|
||||
|
||||
retcode = 0
|
||||
if 'preinstall_script' in item:
|
||||
@@ -503,8 +503,8 @@ def installWithInfo(dirpath, installlist, only_forced=False, applesus=False):
|
||||
# depend on this one, we shouldn't continue
|
||||
munkicommon.display_error("Installer item %s was not found." %
|
||||
item["installer_item"])
|
||||
return restartflag
|
||||
|
||||
return restartflag, skipped_installs
|
||||
|
||||
installer_type = item.get("installer_type","")
|
||||
if installer_type.startswith("Adobe"):
|
||||
retcode = adobeutils.doAdobeInstall(item)
|
||||
@@ -556,10 +556,10 @@ def installWithInfo(dirpath, installlist, only_forced=False, applesus=False):
|
||||
munkicommon.display_error("No filesystems mounted "
|
||||
"from %s" %
|
||||
item["installer_item"])
|
||||
return restartflag
|
||||
return restartflag, skipped_installs
|
||||
if munkicommon.stopRequested():
|
||||
munkicommon.unmountdmg(mountpoints[0])
|
||||
return restartflag
|
||||
return restartflag, skipped_installs
|
||||
|
||||
retcode = -99 # in case we find nothing to install
|
||||
needtorestart = False
|
||||
@@ -597,7 +597,8 @@ def installWithInfo(dirpath, installlist, only_forced=False, applesus=False):
|
||||
restartflag = True
|
||||
|
||||
if retcode == 0 and 'postinstall_script' in item:
|
||||
# only run embedded postinstall script if we still have a
|
||||
# only run embedded postinstall script if the install did not
|
||||
# return a failure code
|
||||
retcode = runEmbeddedScript('postinstall_script', item)
|
||||
if retcode:
|
||||
# we won't consider postinstall script failures as fatal
|
||||
|
||||
Reference in New Issue
Block a user