Commit 67712e8d authored by Guillaume's avatar Guillaume
Browse files

Fix issue on csv generation by source.

parent 45e354d4
......@@ -34,9 +34,6 @@ class Process(object):
# Retrieve DRS parser from global variables forked to the worker.
global drs
# Set CSV entries list.
self.entries = list()
def __call__(self, source):
"""
Any error switches to the next child process.
......@@ -50,6 +47,9 @@ class Process(object):
print(f'Processing {source}...')
# Set CSV entries list.
self.entries = list()
# Iterate over lines.
for line in f:
......@@ -90,11 +90,11 @@ class Process(object):
# Append entry to final list.
self.entries.append(entry)
catname = '_'.join(source.split('/')[2:-1])
catpath = os.path.join(self.outcat, self.project, catname)
catname = '_'.join(source.split('/')[2:-1])
catpath = os.path.join(self.outcat, self.project, catname)
# Write CSV catalog.
make_csv(catpath + CSV_EXTENSION, self.entries)
# Write CSV catalog.
make_csv(catpath + CSV_EXTENSION, self.entries)
except Exception as e:
print(source, e)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment