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
dc5f3080
Commit
dc5f3080
authored
Jan 19, 2021
by
LE GAC Renaud
Browse files
Update automatons to fix a bug calling Msg.reject
parent
70adb82b
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
8 additions
and
8 deletions
+8
-8
modules/harvest_tools/articles.py
modules/harvest_tools/articles.py
+1
-1
modules/harvest_tools/automaton.py
modules/harvest_tools/automaton.py
+2
-2
modules/harvest_tools/notes.py
modules/harvest_tools/notes.py
+1
-1
modules/harvest_tools/preprints.py
modules/harvest_tools/preprints.py
+1
-1
modules/harvest_tools/proceedings.py
modules/harvest_tools/proceedings.py
+1
-1
modules/harvest_tools/talks.py
modules/harvest_tools/talks.py
+1
-1
modules/harvest_tools/thesis.py
modules/harvest_tools/thesis.py
+1
-1
No files found.
modules/harvest_tools/articles.py
View file @
dc5f3080
...
...
@@ -58,7 +58,7 @@ class Articles(Automaton):
stype
=
record
.
subtype
()
if
stype
!=
"article"
:
self
.
logs
[
-
1
].
reject
(
MSG_IS
.
format
(
stype
),
record
)
self
.
logs
[
-
1
].
reject
(
MSG_IS
.
format
(
stype
),
record
=
record
)
return
False
try
:
...
...
modules/harvest_tools/automaton.py
View file @
dc5f3080
...
...
@@ -184,12 +184,12 @@ class Automaton(object):
if
isinstance
(
msg
,
list
):
msg
=
"%s %s"
%
(
msg
[
0
],
msg
[
-
1
])
self
.
logs
[
-
1
].
reject
(
msg
,
log_year
)
self
.
logs
[
-
1
].
reject
(
msg
,
year
=
log_year
)
return
0
# operation can be rejected by the database
except
Exception
as
dbe
:
self
.
logs
[
-
1
].
reject
(
str
(
dbe
),
log_year
)
self
.
logs
[
-
1
].
reject
(
str
(
dbe
),
year
=
log_year
)
return
0
def
_is_record_in_db
(
self
,
...
...
modules/harvest_tools/notes.py
View file @
dc5f3080
...
...
@@ -37,7 +37,7 @@ class Notes(Automaton):
stype
=
record
.
subtype
()
if
stype
!=
"note"
:
self
.
logs
[
-
1
].
reject
(
MSG_IS
.
format
(
stype
),
record
)
self
.
logs
[
-
1
].
reject
(
MSG_IS
.
format
(
stype
),
record
=
record
)
return
False
try
:
...
...
modules/harvest_tools/preprints.py
View file @
dc5f3080
...
...
@@ -45,7 +45,7 @@ class Preprints(Automaton):
stype
=
record
.
subtype
()
if
stype
!=
"preprint"
:
self
.
logs
[
-
1
].
reject
(
MSG_IS
.
format
(
stype
),
record
)
self
.
logs
[
-
1
].
reject
(
MSG_IS
.
format
(
stype
),
record
=
record
)
return
False
if
record
.
is_published
():
...
...
modules/harvest_tools/proceedings.py
View file @
dc5f3080
...
...
@@ -43,7 +43,7 @@ class Proceedings(Automaton):
stype
=
record
.
subtype
()
if
stype
!=
"proceeding"
:
self
.
logs
[
-
1
].
reject
(
MSG_IS
.
format
(
stype
),
record
)
self
.
logs
[
-
1
].
reject
(
MSG_IS
.
format
(
stype
),
record
=
record
)
return
False
try
:
...
...
modules/harvest_tools/talks.py
View file @
dc5f3080
...
...
@@ -40,7 +40,7 @@ class Talks(Automaton):
self
.
logger
.
debug
(
f
"
{
T4
}
check and fix record (talk)"
)
if
not
isinstance
(
record
,
(
RecordCdsConfPaper
,
RecordHepConfPaper
)):
self
.
logs
[
-
1
].
reject
(
MSG_NOT_TALK
,
record
)
self
.
logs
[
-
1
].
reject
(
MSG_NOT_TALK
,
record
=
record
)
return
False
try
:
...
...
modules/harvest_tools/thesis.py
View file @
dc5f3080
...
...
@@ -33,7 +33,7 @@ class Thesis(Automaton):
stype
=
record
.
subtype
()
if
stype
!=
"thesis"
:
self
.
logs
[
-
1
].
reject
(
MSG_IS
.
format
(
stype
),
record
)
self
.
logs
[
-
1
].
reject
(
MSG_IS
.
format
(
stype
),
record
=
record
)
return
False
try
:
...
...
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