Skip to content

Commit 34a7fc6

Browse files
committed
Fix bug that made cASO report only last project configured
The commit 0288654 introduced a bug in the way we collected all the records, that made cASO report only for the last configured (i.e. the last on the list) project. Fix: #74
1 parent c8325f5 commit 34a7fc6

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

caso/extract/manager.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,6 @@ class Manager(object):
6666
def __init__(self):
6767
extractor = loading.get_available_extractors()[CONF.extractor]
6868
self.extractor = extractor()
69-
self.records = None
7069
self.last_run_base = os.path.join(CONF.spooldir, "lastrun")
7170

7271
def get_lastrun(self, project):
@@ -113,7 +112,7 @@ def get_records(self):
113112
if extract_to.tzinfo is None:
114113
extract_to.replace(tzinfo=tz.tzutc())
115114

116-
records = {}
115+
all_records = {}
117116
for project in CONF.projects:
118117
LOG.info("Extracting records for project '%s'" % project)
119118

@@ -136,6 +135,6 @@ def get_records(self):
136135
LOG.info("Extracted %d records for project '%s' from "
137136
"%s to %s" % (len(records), project, extract_from,
138137
extract_to))
139-
records.update(records)
138+
all_records.update(records)
140139
self.write_lastrun(project)
141-
return records
140+
return all_records

0 commit comments

Comments
 (0)