Since adobeutils.py can now sometimes delete the diskimage file before it returns to installer.py, add a check to make sure the diskimage file exists before we try to remove it.

git-svn-id: http://munki.googlecode.com/svn/trunk@628 a4e17f2e-e282-11dd-95e1-755cbddbdd66
This commit is contained in:
Greg Neagle
2010-07-30 00:02:41 +00:00
parent d017f8be80
commit 6e9cc3d21e
+8 -5
View File
@@ -609,12 +609,15 @@ def installWithInfo(dirpath, installlist):
break
if not foundagain:
# now remove the item from the install cache
# now remove the item from the install cache
# (if it's still there)
itempath = os.path.join(dirpath, current_installer_item)
if os.path.isdir(itempath):
retcode = subprocess.call(["/bin/rm", "-rf", itempath])
else:
retcode = subprocess.call(["/bin/rm", itempath])
if os.path.exists(itempath):
if os.path.isdir(itempath):
retcode = subprocess.call(
["/bin/rm", "-rf", itempath])
else:
retcode = subprocess.call(["/bin/rm", itempath])
shadowfile = os.path.join(itempath,".shadow")
if os.path.exists(shadowfile):
retcode = subprocess.call(["/bin/rm", shadowfile])