diff options
| author | Jenkins <jenkins@review.openstack.org> | 2014-09-07 12:59:35 +0000 |
|---|---|---|
| committer | Gerrit Code Review <review@openstack.org> | 2014-09-07 12:59:35 +0000 |
| commit | dcf658cc4e6c6df4e1543178d78ef70338c95d11 (patch) | |
| tree | a40cbab439a5413d879442a6f668f98ff7ef3243 /openstackclient/common/utils.py | |
| parent | 9b3c84e9e19785dd377ef5c3f754bfddebc75f06 (diff) | |
| parent | 514ecc6e963bd0c05425f0da8aec79a69ed122c6 (diff) | |
| download | python-openstackclient-dcf658cc4e6c6df4e1543178d78ef70338c95d11.tar.gz | |
Merge "Unordered dicts and lists causes variable results"
Diffstat (limited to 'openstackclient/common/utils.py')
| -rw-r--r-- | openstackclient/common/utils.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/openstackclient/common/utils.py b/openstackclient/common/utils.py index cef9dcee..227b0438 100644 --- a/openstackclient/common/utils.py +++ b/openstackclient/common/utils.py @@ -77,7 +77,7 @@ def format_dict(data): """ output = "" - for s in data: + for s in sorted(data): output = output + s + "='" + six.text_type(data[s]) + "', " return output[:-2] @@ -89,7 +89,7 @@ def format_list(data): :rtype: a string formatted to a,b,c """ - return ', '.join(data) + return ', '.join(sorted(data)) def get_item_properties(item, fields, mixed_case_fields=[], formatters={}): |
