Skip to content

Commit bce9004

Browse files
committed
Initialize the variable of the OSS Item
1 parent fa2bcd3 commit bce9004

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

src/fosslight_util/oss_item.py

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -89,11 +89,14 @@ def source_name_or_path(self):
8989

9090
@source_name_or_path.setter
9191
def source_name_or_path(self, value):
92-
if not isinstance(value, list):
93-
value = value.split(",")
94-
self._source_name_or_path.extend(value)
95-
self._source_name_or_path = [item.strip() for item in self._source_name_or_path]
96-
self._source_name_or_path = list(set(self._source_name_or_path))
92+
if not value:
93+
self._source_name_or_path = []
94+
else:
95+
if not isinstance(value, list):
96+
value = value.split(",")
97+
self._source_name_or_path.extend(value)
98+
self._source_name_or_path = [item.strip() for item in self._source_name_or_path]
99+
self._source_name_or_path = list(set(self._source_name_or_path))
97100

98101
@property
99102
def yocto_recipe(self):

0 commit comments

Comments
 (0)