diff --git a/scripts/lib/xpedite/analytics/__init__.py b/scripts/lib/xpedite/analytics/__init__.py index 8795e723..9d50fc02 100644 --- a/scripts/lib/xpedite/analytics/__init__.py +++ b/scripts/lib/xpedite/analytics/__init__.py @@ -189,16 +189,18 @@ def filterTxns(repo, txnFilter): """ totalFilteredCount = 0 for txnCollection in repo.getTxnCollections(): - txnMap = txnCollection.txnMap + txnMap = {} filteredCount = 0 unfilteredCount = len(txnMap) - for tid, txn in txnMap.items(): + for tid, txn in txnCollection.txnMap.items(): if not txnFilter(txnCollection.name, txn): - del txnMap[tid] filteredCount += 1 + else: + txnMap[tid] = txn if filteredCount: LOGGER.debug('filtering txns from \"%s\" - removed %d out of %d', txnCollection.name, filteredCount, unfilteredCount ) totalFilteredCount += filteredCount + txnCollection.txnMap = txnMap return totalFilteredCount