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
This commit is contained in:
Emilien Macchi 2019-10-15 10:21:31 -04:00
parent cfa2fc51ab
commit b9b3e32b4e
1 changed files with 1 additions and 1 deletions

View File

@ -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))