diff options
author | Saqib Khan <khansa@us.ibm.com> | 2017-03-07 07:05:56 -0600 |
---|---|---|
committer | Patrick Williams <patrick@stwcx.xyz> | 2017-03-16 21:53:33 +0000 |
commit | dc2090d1ffaf61df2959425c2969ceb0712e1201 (patch) | |
tree | 2e5538c7ba2dd9c3a55520d353db404300e5c02b /meta-phosphor | |
parent | cef980ac62403faad244bd6bda23a2b4772bb544 (diff) | |
download | talos-openbmc-dc2090d1ffaf61df2959425c2969ceb0712e1201.tar.gz talos-openbmc-dc2090d1ffaf61df2959425c2969ceb0712e1201.zip |
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>
Diffstat (limited to 'meta-phosphor')
-rw-r--r-- | meta-phosphor/classes/obmc-phosphor-utils.bbclass | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/meta-phosphor/classes/obmc-phosphor-utils.bbclass b/meta-phosphor/classes/obmc-phosphor-utils.bbclass index baaa19d57..8ac8c7d2d 100644 --- a/meta-phosphor/classes/obmc-phosphor-utils.bbclass +++ b/meta-phosphor/classes/obmc-phosphor-utils.bbclass @@ -26,7 +26,7 @@ def set_append(d, var, val, sep=' '): 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 @@ def append_suffix(val, suffix): newval = [] for w in words: newval.append(w + suffix) - return ' '.join(newval)
\ No newline at end of file + return ' '.join(newval) |