Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
IPSL
E
ESPRI
ESPRI-Mod
catalog
Commits
67712e8d
Commit
67712e8d
authored
Feb 04, 2022
by
Guillaume
Browse files
Fix issue on csv generation by source.
parent
45e354d4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
+7
-7
esm_cat_generator.py
esm_cat_generator.py
+7
-7
No files found.
esm_cat_generator.py
View file @
67712e8d
...
...
@@ -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
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment