diff options
author | termie <github@anarkystic.com> | 2011-11-15 16:13:13 -0800 |
---|---|---|
committer | termie <github@anarkystic.com> | 2011-11-15 16:13:13 -0800 |
commit | b0733cab49f118d008f6951bb542f69c1f0f616a (patch) | |
tree | cfd949146b650aa75bf526d352ddb2b44f996143 /bin | |
parent | 3479575623233c277af611ff8e8ab058b935192a (diff) | |
download | keystone-b0733cab49f118d008f6951bb542f69c1f0f616a.tar.gz keystone-b0733cab49f118d008f6951bb542f69c1f0f616a.tar.xz keystone-b0733cab49f118d008f6951bb542f69c1f0f616a.zip |
change array syntax
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/ksl | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -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 |