Skip to content
Snippets Groups Projects
Commit 14aaf6bd authored by Henrik tom Wörden's avatar Henrik tom Wörden
Browse files

FIX: catch ValueError when reading include file

parent aa8c21a9
No related branches found
No related tags found
1 merge request!22Release 0.3
......@@ -261,10 +261,17 @@ class WithREADME(object):
for item in self.header[field.key]:
if INCLUDE.key in item:
included.extend(
get_entity_ids_from_include_file(
os.path.dirname(self.crawled_path),
item[INCLUDE.key]))
try:
included.extend(
get_entity_ids_from_include_file(
os.path.dirname(self.crawled_path),
item[INCLUDE.key]))
except ValueError:
al = logging.getLogger("caosadvancedtools")
al.warning("The include file cannot be read. Please "
"make sure, it contains an 'ID' column."
" The file is ignored."
"\n{}".format(item[INCLUDE.key]))
assure_object_is_in_list(included,
record,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment