From 49f46a7686cab15eb2ec9335ca00e9cd7eb547b3 Mon Sep 17 00:00:00 2001 From: Kenny Woodson Date: Wed, 8 Mar 2017 13:03:35 -0500 Subject: Removing ordereddict. Replaced with sorted keys. --- roles/lib_openshift/src/lib/base.py | 7 ++++--- roles/lib_openshift/src/lib/import.py | 1 - 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'roles/lib_openshift/src/lib') 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 diff --git a/roles/lib_openshift/src/lib/import.py b/roles/lib_openshift/src/lib/import.py index 97e03062e..a79297898 100644 --- a/roles/lib_openshift/src/lib/import.py +++ b/roles/lib_openshift/src/lib/import.py @@ -7,7 +7,6 @@ from __future__ import print_function import atexit -import collections import copy import json import os -- cgit v1.2.3