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
Branches
Tags
1 merge request!22Release 0.3
...@@ -261,10 +261,17 @@ class WithREADME(object): ...@@ -261,10 +261,17 @@ class WithREADME(object):
for item in self.header[field.key]: for item in self.header[field.key]:
if INCLUDE.key in item: if INCLUDE.key in item:
included.extend( try:
get_entity_ids_from_include_file( included.extend(
os.path.dirname(self.crawled_path), get_entity_ids_from_include_file(
item[INCLUDE.key])) 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, assure_object_is_in_list(included,
record, record,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment