Skip to content

Commit d6ffe17

Browse files
authored
Merge pull request #49 from fosslight/null
Check null into yocto_recipe/package
2 parents e800bd3 + 95582ea commit d6ffe17

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/fosslight_yocto/_package_item.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ def yocto_recipe(self):
7474
def yocto_recipe(self, value):
7575
if not isinstance(value, list):
7676
value = value.split(",")
77+
value = remove_null_values(value)
7778
self._yocto_recipe.extend(value)
7879
self._yocto_recipe = [item.strip() for item in self._yocto_recipe]
7980
self._yocto_recipe = list(set(self._yocto_recipe))
@@ -86,6 +87,7 @@ def yocto_package(self):
8687
def yocto_package(self, value):
8788
if not isinstance(value, list):
8889
value = value.split(",")
90+
value = remove_null_values(value)
8991
self._yocto_package.extend(value)
9092
self._yocto_package = [item.strip() for item in self._yocto_package]
9193
self._yocto_package = list(set(self._yocto_package))
@@ -306,3 +308,7 @@ def update_package_name(oss, value, nested_pkg_name):
306308
oss.parent_package_name = value
307309
oss.package_name = value
308310
return oss
311+
312+
313+
def remove_null_values(data):
314+
return [item for item in data if item is not None]

0 commit comments

Comments
 (0)