Fix so an empty receipts array doesn't cause an unhandled exception

git-svn-id: http://munki.googlecode.com/svn/trunk@674 a4e17f2e-e282-11dd-95e1-755cbddbdd66
This commit is contained in:
Greg Neagle
2010-08-25 15:05:05 +00:00
parent 7dfac4190e
commit bdefc367b3
+4 -1
View File
@@ -108,7 +108,10 @@ def getCatalogInfoFromDmg(dmgpath, options):
# we found a package, but let's see if it's an Adobe CS5 install
# (AAMEE) package
if 'receipts' in cataloginfo:
pkgid = cataloginfo['receipts'][0].get('packageid')
try:
pkgid = cataloginfo['receipts'][0].get('packageid')
except IndexError:
pkgid = ""
if pkgid.startswith("com.adobe.Enterprise.install"):
# we have an Adobe CS5 install package, process
# as Adobe install