Added try/except around removing Apple updates plist files.

git-svn-id: http://munki.googlecode.com/svn/trunk@301 a4e17f2e-e282-11dd-95e1-755cbddbdd66
This commit is contained in:
Greg Neagle
2009-11-02 18:48:49 +00:00
parent b6f3444d2c
commit 5418c4ac53
+10 -7
View File
@@ -452,13 +452,16 @@ def installAppleUpdates():
# did we find some Apple updates?
if appleupdatelist:
# once we start, we should remove /Library/Updates/index.plist
# because it will point to items we've already installed
os.unlink('/Library/Updates/index.plist')
# remove the appleupdatesfile
# so Managed Software Update.app doesn't display these
# updates again
os.unlink(appleUpdatesFile)
try:
# once we start, we should remove /Library/Updates/index.plist
# because it will point to items we've already installed
os.unlink('/Library/Updates/index.plist')
# remove the appleupdatesfile
# so Managed Software Update.app doesn't display these
# updates again
os.unlink(appleUpdatesFile)
except:
pass
# now try to install the updates
restartneeded = installer.installWithInfo("/Library/Updates", appleupdatelist, appleupdates=True)