summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authortermie <github@anarkystic.com>2011-11-15 16:13:13 -0800
committertermie <github@anarkystic.com>2011-11-15 16:13:13 -0800
commitb0733cab49f118d008f6951bb542f69c1f0f616a (patch)
treecfd949146b650aa75bf526d352ddb2b44f996143 /bin
parent3479575623233c277af611ff8e8ab058b935192a (diff)
downloadkeystone-b0733cab49f118d008f6951bb542f69c1f0f616a.tar.gz
keystone-b0733cab49f118d008f6951bb542f69c1f0f616a.tar.xz
keystone-b0733cab49f118d008f6951bb542f69c1f0f616a.zip
change array syntax
Diffstat (limited to 'bin')
-rwxr-xr-xbin/ksl10
1 files changed, 5 insertions, 5 deletions
diff --git a/bin/ksl b/bin/ksl
index 3354288a..0a9d7736 100755
--- a/bin/ksl
+++ b/bin/ksl
@@ -33,11 +33,11 @@ class BaseApp(cli.log.LoggingApp):
for x in args:
key, value = x.split('=', 1)
# make lists if there are multiple values
- if key in kv:
- if type(kv) is type(tuple()):
- kv[key] = kv[key] + (value,)
- else:
- kv[key] = (kv[key], value)
+ if key.endswith('[]'):
+ key = key[:-2]
+ existing = kv.get(key, [])
+ existing.append(value)
+ kv[key] = existing
else:
kv[key] = value
return kv