Make sure uninstall script is removed regardless of success or failure.

git-svn-id: http://munki.googlecode.com/svn/trunk@927 a4e17f2e-e282-11dd-95e1-755cbddbdd66
This commit is contained in:
Greg Neagle
2010-11-23 19:21:11 +00:00
parent 337bb70150
commit ece16bfac6
+3
View File
@@ -805,7 +805,10 @@ def processRemovals(removallist, only_forced=False):
if (retcode == 0 and item.get(
'RestartAction') == "RequireRestart"):
restartFlag = True
try:
os.unlink(scriptpath)
except OSError:
pass
else:
munkicommon.display_error("Cannot write uninstall "
"script for %s" % name)