Commit 13734bd4 authored by Sébastien DA ROCHA's avatar Sébastien DA ROCHA
Browse files

ignore geonetwork new fields

parent 6856352a
Pipeline #14802 passed with stages
in 51 seconds
......@@ -65,16 +65,19 @@ def list_to_dictlist( the_input, the_context=None ):
out_item = {}
for k, line in enumerate(in_item_split):
if line != "":
if the_context != None:
out_item[ dictionary[the_context][k] ] = line
if the_context and k in dictionary[the_context].keys():
if line != "":
if the_context and dictionary[the_context].get(k):
out_item[ dictionary[the_context][k] ] = line
else:
out_item[ k ] = line
else:
out_item[ k ] = line
else:
out_item[ dictionary[the_context][k] ] = 'null'
if dictionary[the_context].get(k):
out_item[ dictionary[the_context][k] ] = 'null'
logging.debug(the_context)
logging.debug(out_item)
logging.debug("context : %s", the_context)
logging.debug("input: %s", in_item)
logging.debug("result : %s", out_item)
# appending a hash value of the item can be useful at client-side,
# as it allows one to identify entities that are common to multiple datasets...
......@@ -420,6 +423,6 @@ if __name__ == '__main__':
logging.info('Waiting for RabbitMQ to be reachable...')
time.sleep(5)
except Exception as e:
logging.error(e)
logging.exception("General error (Aborting): %s", e)
time.sleep(5)
exit(1)
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