mirror of https://github.com/CIRCL/AIL-framework
fix: [items source] fix empty sources list
parent
546d6538fd
commit
24969610cc
|
@ -209,7 +209,10 @@ def _get_dir_source_name(directory, source_name=None, l_sources_name=set(), filt
|
|||
l_dir = os.listdir(directory)
|
||||
# empty directory
|
||||
if not l_dir:
|
||||
if source_name:
|
||||
return l_sources_name.add(source_name)
|
||||
else:
|
||||
return l_sources_name
|
||||
else:
|
||||
for src_name in l_dir:
|
||||
if len(src_name) == 4:
|
||||
|
|
Loading…
Reference in New Issue