# HG changeset patch # User casties # Date 1502918275 -7200 # Node ID adfb57978a696c3de53e2b478d6c390bca2d3b12 # Parent 4f833d8fc383b05b26d46dfdbf69b71d7431c2e4 use sys.exit(1) when something breaks. diff -r 4f833d8fc383 -r adfb57978a69 importFromOpenMind/importer/ismixml2model.py --- a/importFromOpenMind/importer/ismixml2model.py Tue Aug 01 19:10:46 2017 +0200 +++ b/importFromOpenMind/importer/ismixml2model.py Wed Aug 16 23:17:55 2017 +0200 @@ -12,7 +12,8 @@ # node types to exclude from the graph -exclude_objects_of_type = ['DIGITALIZATION', 'REFERENCE'] +#exclude_objects_of_type = ['DIGITALIZATION', 'REFERENCE'] +exclude_objects_of_type = [] # attributes to exclude exclude_attributes_of_type = [ @@ -303,8 +304,8 @@ log('DEBUG', "reading entity[%s]"%ismi_id) if ismi_id in nx_nodes: - log("ERROR", "entity with id=%s exists!"%ismi_id) - return + log("ERROR", "entity with id=%s exists! Aborting."%ismi_id) + sys.exit(1) # create networkx node node = nodeFromEnt(ent_elem) @@ -332,8 +333,8 @@ log('DEBUG', "reading relation[%s]"%ismi_id) if ismi_id in nx_relations: - print("ERROR: relation with id=%s exists!"%ismi_id) - return + print("ERROR: relation with id=%s exists! Aborting."%ismi_id) + sys.exit(1) # create networkx relation relation = relationFromRel(rel_elem)