Signed-off-by: Daniel P. Berrangé <berrange@xxxxxxxxxx> --- guests/lcitool | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/guests/lcitool b/guests/lcitool index 1271954..0978c40 100755 --- a/guests/lcitool +++ b/guests/lcitool @@ -529,15 +529,18 @@ class Application: if os_full in mappings[package]: temp[package] = mappings[package][os_full] - flattened = [] + pkgs = [] for item in temp: - if temp[item] is not None and temp[item] not in flattened: - flattened += [temp[item]] + pkgname = temp[item] + if pkgname is None: + continue + if pkgname not in pkgs: + pkgs.append(pkgname) print("FROM {}".format(facts["docker_base"])) sys.stdout.write("ENV PACKAGES ") - sys.stdout.write(" \\\n ".join(sorted(flattened))) + sys.stdout.write(" \\\n ".join(sorted(pkgs))) if package_format == "deb": sys.stdout.write(textwrap.dedent(""" -- 2.20.1