Skip to content

Commit

Permalink
fix: [items source] fix empty sources list
Browse files Browse the repository at this point in the history
  • Loading branch information
Terrtia committed Aug 29, 2023
1 parent 546d653 commit 2496961
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion bin/lib/item_basic.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 2496961

Please sign in to comment.