diff --git a/bin/lib/item_basic.py b/bin/lib/item_basic.py index 71fa5378..b35d126e 100755 --- a/bin/lib/item_basic.py +++ b/bin/lib/item_basic.py @@ -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: - return l_sources_name.add(source_name) + 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: