diff options
author | Jason DeTiberus <detiber@gmail.com> | 2017-02-20 12:37:28 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-02-20 12:37:28 -0500 |
commit | a40ee317e7727749240eb4475bdfe2eda00bbbcc (patch) | |
tree | 7460c69e0f211476572ad4c5c027e0150d6841c9 /roles | |
parent | 3d80a37685da4948aad62419e49335cb5a140826 (diff) | |
parent | d4a424e51e4cce0e3a5a4618f696800ebe655d25 (diff) | |
download | openshift-a40ee317e7727749240eb4475bdfe2eda00bbbcc.tar.gz openshift-a40ee317e7727749240eb4475bdfe2eda00bbbcc.tar.bz2 openshift-a40ee317e7727749240eb4475bdfe2eda00bbbcc.tar.xz openshift-a40ee317e7727749240eb4475bdfe2eda00bbbcc.zip |
Merge pull request #3424 from ashcrow/new-modules-py3
Replace has_key in new modules
Diffstat (limited to 'roles')
-rw-r--r-- | roles/lib_openshift/library/oc_secret.py | 4 | ||||
-rw-r--r-- | roles/lib_openshift/src/class/oc_secret.py | 2 | ||||
-rw-r--r-- | roles/lib_openshift/src/lib/secret.py | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/roles/lib_openshift/library/oc_secret.py b/roles/lib_openshift/library/oc_secret.py index f3bb3c413..c423e9442 100644 --- a/roles/lib_openshift/library/oc_secret.py +++ b/roles/lib_openshift/library/oc_secret.py @@ -1429,7 +1429,7 @@ class Secret(Yedit): def update_secret(self, key, value): ''' update a secret''' # pylint: disable=no-member - if self.secrets.has_key(key): + if key in self.secrets: self.secrets[key] = value else: self.add_secret(key, value) @@ -1467,7 +1467,7 @@ class OCSecret(OpenShiftCLI): if results['returncode'] == 0 and results['results'][0]: results['exists'] = True if self.decode: - if results['results'][0].has_key('data'): + if 'data' in results['results'][0]: for sname, value in results['results'][0]['data'].items(): results['decoded'][sname] = base64.b64decode(value) diff --git a/roles/lib_openshift/src/class/oc_secret.py b/roles/lib_openshift/src/class/oc_secret.py index 5eac27572..deb36a9fa 100644 --- a/roles/lib_openshift/src/class/oc_secret.py +++ b/roles/lib_openshift/src/class/oc_secret.py @@ -29,7 +29,7 @@ class OCSecret(OpenShiftCLI): if results['returncode'] == 0 and results['results'][0]: results['exists'] = True if self.decode: - if results['results'][0].has_key('data'): + if 'data' in results['results'][0]: for sname, value in results['results'][0]['data'].items(): results['decoded'][sname] = base64.b64decode(value) diff --git a/roles/lib_openshift/src/lib/secret.py b/roles/lib_openshift/src/lib/secret.py index 39bf3c33a..1ba78ddd5 100644 --- a/roles/lib_openshift/src/lib/secret.py +++ b/roles/lib_openshift/src/lib/secret.py @@ -91,7 +91,7 @@ class Secret(Yedit): def update_secret(self, key, value): ''' update a secret''' # pylint: disable=no-member - if self.secrets.has_key(key): + if key in self.secrets: self.secrets[key] = value else: self.add_secret(key, value) |