Specify len() of object by converting to list
Helps resolve the following error in python3:
TypeError: object of type 'filter' has no len()
Change-Id: Id607186baeacc3802f651d5cb72af82d0c10115b
Signed-off-by: Saqib Khan <khansa@us.ibm.com>
diff --git a/classes/obmc-phosphor-utils.bbclass b/classes/obmc-phosphor-utils.bbclass
index baaa19d..8ac8c7d 100644
--- a/classes/obmc-phosphor-utils.bbclass
+++ b/classes/obmc-phosphor-utils.bbclass
@@ -26,7 +26,7 @@
def listvar_to_list(d, list_var, sep=' '):
- return filter(bool, (d.getVar(list_var, True) or '').split(sep))
+ return list(filter(bool, (d.getVar(list_var, True) or '').split(sep)))
def compose_list(d, fmtvar, *listvars, **kw):
@@ -49,4 +49,4 @@
newval = []
for w in words:
newval.append(w + suffix)
- return ' '.join(newval)
\ No newline at end of file
+ return ' '.join(newval)