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
limbra
limbra
Commits
21d028a5
Commit
21d028a5
authored
Feb 06, 2020
by
LE GAC Renaud
Browse files
Update Automaton to use map instead of list comprehension.
parent
219a896c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
modules/harvest_tools/automaton.py
modules/harvest_tools/automaton.py
+3
-2
No files found.
modules/harvest_tools/automaton.py
View file @
21d028a5
...
...
@@ -527,6 +527,7 @@ class Automaton(object):
rec_ids
=
store
.
get_ids
(
**
kwargs
)
except
CdsException
as
error
:
logger
.
debug
(
f
"exit process_collection:
{
error
}
"
)
collection_logs
[
-
1
].
url
=
store
.
last_search_url
()
collection_logs
[
-
1
].
error
=
error
return
...
...
@@ -547,7 +548,7 @@ class Automaton(object):
rec_ids
=
[
el
for
el
in
rec_ids
if
func
(
ctitle
,
host
,
el
)
==
0
]
# process the remaining identifiers
[
self
.
process_recid
(
rec_id
)
for
rec_id
in
rec_ids
]
(
*
map
(
self
.
process_recid
,
rec_id
s
),
)
def
process_recjson
(
self
,
recjson
):
"""Process the publication provided as a JSON record:
...
...
@@ -672,7 +673,7 @@ class Automaton(object):
collections
=
re
.
sub
(
" *, *"
,
","
,
collections
).
split
(
","
)
# process
[
self
.
process_collection
(
collection
)
for
collection
in
collections
]
(
*
map
(
self
.
process_collection
,
collection
s
),
)
def
report
(
self
):
"""Build the processing report.
...
...
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