mirror of
https://github.com/munki/munki.git
synced 2026-04-22 20:48:36 -05:00
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:
@@ -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])
|
||||
|
||||
Reference in New Issue
Block a user