From 24969610cc4d5c04845e65dfaf9a5592487a0954 Mon Sep 17 00:00:00 2001 From: Terrtia Date: Tue, 29 Aug 2023 11:59:39 +0200 Subject: [PATCH] fix: [items source] fix empty sources list --- bin/lib/item_basic.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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: