Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
memoriav
Memobase 2020
services
postprocessing
Media Metadata Indexer
Commits
817fc356
Unverified
Commit
817fc356
authored
Mar 02, 2021
by
Sebastian Schüpbach
Browse files
fix dict access error
Signed-off-by:
Sebastian Schüpbach
<
sebastian.schuepbach@unibas.ch
>
parent
69017ff9
Pipeline
#22558
passed with stages
in 1 minute and 43 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
mediametadatatodb_app/resources/processor.py
View file @
817fc356
...
...
@@ -96,7 +96,7 @@ class RecordProcessor:
logging
.
error
(
"Indexing failed. Aborting..."
)
for
key
in
self
.
processed_records
.
keys
():
self
.
reporter
.
send_message
(
key
,
'FATAL'
,
f
'Indexing failed:
{
ex
}
'
,
self
.
processed_records
[
'headers'
])
self
.
processed_records
[
key
][
'headers'
])
def
index
(
self
):
for
key
in
self
.
processed_records
.
keys
():
...
...
@@ -131,17 +131,17 @@ class RecordProcessor:
(
'DIGITAL OBJECT: {} -- THUMBNAIL: {}'
+
' -- AUDIO SNIPPET: {}'
).
format
(
dig_obj_msg
,
thumbnail_msg
,
audio_snip_msg
),
self
.
processed_
record
s
[
'headers'
])
),
record
[
'headers'
])
elif
ok
:
self
.
indexer
.
commit
()
self
.
reporter
.
send_message
(
key
,
'FATAL'
,
(
'DIGITAL OBJECT: {} -- THUMBNAIL: {} '
+
'-- AUDIO SNIPPET: {}'
)
.
format
(
dig_obj_msg
,
thumbnail_msg
,
audio_snip_msg
),
self
.
processed_
record
s
[
'headers'
])
record
[
'headers'
])
else
:
self
.
indexer
.
rollback
()
self
.
reporter
.
send_message
(
key
,
'FATAL'
,
f
'Indexing failed:
{
err_msg
}
'
,
self
.
processed_
record
s
[
'headers'
])
record
[
'headers'
])
self
.
processed_records
.
clear
()
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