From e2532d4ffbc1d5c8e34b2c9e6ce50400f83b15f1 Mon Sep 17 00:00:00 2001 From: "Martin A. Brown" Date: Wed, 9 Mar 2016 20:53:21 -0800 Subject: [PATCH] use the already written darned function --- tldp/driver.py | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/tldp/driver.py b/tldp/driver.py index c1659d6..656bb46 100644 --- a/tldp/driver.py +++ b/tldp/driver.py @@ -426,13 +426,10 @@ def collectWorkset(config, args): inv = None if stati: - oldsize = len(workset) - for status in stati: - collection = getattr(inv, status) - workset.update(collection.values()) - growth = len(workset) - oldsize - if growth: - logger.info("Added %d docs, found by status class .", growth) + docs = getDocumentsByStatus(inv.all.values(), stati) + workset.update(docs) + if docs: + logger.info("Added %d docs, found by status class .", len(docs)) unknownargs = None if remainder: