diff --git a/code/client/munkiimport b/code/client/munkiimport index 0ea593ff..cc085822 100755 --- a/code/client/munkiimport +++ b/code/client/munkiimport @@ -478,11 +478,13 @@ def makeCatalogDB(): for receipt in item.get('receipts', []): try: if 'packageid' in receipt and 'version' in receipt: - if not receipt['packageid'] in pkgid_table: - pkgid_table[receipt['packageid']] = {} - if not vers in pkgid_table[receipt['packageid']]: - pkgid_table[receipt['packageid']][vers] = [] - pkgid_table[receipt['packageid']][vers].append(itemindex) + pkgid = receipt['packageid'] + pkgvers = receipt['version'] + if not pkgid in pkgid_table: + pkgid_table[pkgid] = {} + if not pkgvers in pkgid_table[pkgid]: + pkgid_table[pkgid][pkgvers] = [] + pkgid_table[pkgid][pkgvers].append(itemindex) except TypeError: munkicommon.display_warning( 'Bad receipt data for %s-%s: %s'