From b9b3e32b4ed6647e2992466354b70afcedd5e8f2 Mon Sep 17 00:00:00 2001 From: Emilien Macchi Date: Tue, 15 Oct 2019 10:21:31 -0400 Subject: [PATCH] list_or_dict_arg: fix the else condition The "else" was wrong, if the key was empty with no value, it would try to iterate on something that might not be a list. Let's be sure the instance is a list. Change-Id: I98c75e03d78885173d829fa850f35c52c625e6bb --- paunch/builder/base.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/paunch/builder/base.py b/paunch/builder/base.py index 36e1628..d0ad0d2 100644 --- a/paunch/builder/base.py +++ b/paunch/builder/base.py @@ -241,7 +241,7 @@ class BaseBuilder(object): cmd.append('%s=%s=%s' % (arg, k, v)) elif k: cmd.append('%s=%s' % (arg, k)) - else: + elif isinstance(value, list): for v in value: if v: cmd.append('%s=%s' % (arg, v))