diff options
author | Kenny Woodson <kwoodson@redhat.com> | 2017-03-08 13:03:35 -0500 |
---|---|---|
committer | Kenny Woodson <kwoodson@redhat.com> | 2017-03-08 13:32:27 -0500 |
commit | 49f46a7686cab15eb2ec9335ca00e9cd7eb547b3 (patch) | |
tree | 74ab2f9e445c6145cf7856ae81530c97fc55c021 /roles/lib_openshift/src/lib/base.py | |
parent | 842b69be27aa97bb1df5dde97029d6cbf82aebfb (diff) | |
download | openshift-49f46a7686cab15eb2ec9335ca00e9cd7eb547b3.tar.gz openshift-49f46a7686cab15eb2ec9335ca00e9cd7eb547b3.tar.bz2 openshift-49f46a7686cab15eb2ec9335ca00e9cd7eb547b3.tar.xz openshift-49f46a7686cab15eb2ec9335ca00e9cd7eb547b3.zip |
Removing ordereddict. Replaced with sorted keys.
Diffstat (limited to 'roles/lib_openshift/src/lib/base.py')
-rw-r--r-- | roles/lib_openshift/src/lib/base.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/roles/lib_openshift/src/lib/base.py b/roles/lib_openshift/src/lib/base.py index 3bc34a675..334542b97 100644 --- a/roles/lib_openshift/src/lib/base.py +++ b/roles/lib_openshift/src/lib/base.py @@ -577,7 +577,7 @@ class OpenShiftCLIConfig(object): self.kubeconfig = kubeconfig self.name = rname self.namespace = namespace - self._options = collections.OrderedDict(options) + self._options = options @property def config_options(self): @@ -591,10 +591,11 @@ class OpenShiftCLIConfig(object): def stringify(self): ''' return the options hash as cli params in a string ''' rval = [] - for key, data in self.config_options.items(): + for key in sorted(self.config_options.keys()): + data = self.config_options[key] if data['include'] \ and (data['value'] or isinstance(data['value'], int)): - rval.append('--%s=%s' % (key.replace('_', '-'), data['value'])) + rval.append('--{}={}'.format(key.replace('_', '-'), data['value'])) return rval |