summaryrefslogtreecommitdiffstats
path: root/roles/lib_openshift/library/oc_edit.py
diff options
context:
space:
mode:
authorKenny Woodson <kwoodson@redhat.com>2017-01-18 12:06:49 -0500
committerKenny Woodson <kwoodson@redhat.com>2017-01-18 12:06:49 -0500
commit3fd3cd3a07d9f000c8cb8bd1b7a49ac2af675696 (patch)
tree87aef5928ed8393090c78b64ba83730a10f7ff34 /roles/lib_openshift/library/oc_edit.py
parent24a504f03a3d5edfe8957dcfaa4bde98ae0e60ec (diff)
downloadopenshift-3fd3cd3a07d9f000c8cb8bd1b7a49ac2af675696.tar.gz
openshift-3fd3cd3a07d9f000c8cb8bd1b7a49ac2af675696.tar.bz2
openshift-3fd3cd3a07d9f000c8cb8bd1b7a49ac2af675696.tar.xz
openshift-3fd3cd3a07d9f000c8cb8bd1b7a49ac2af675696.zip
Adding a few updates for python27,35 compatibility
Diffstat (limited to 'roles/lib_openshift/library/oc_edit.py')
-rw-r--r--roles/lib_openshift/library/oc_edit.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/roles/lib_openshift/library/oc_edit.py b/roles/lib_openshift/library/oc_edit.py
index f78cbf2b3..d44f0da88 100644
--- a/roles/lib_openshift/library/oc_edit.py
+++ b/roles/lib_openshift/library/oc_edit.py
@@ -947,14 +947,14 @@ class OpenShiftCLI(object):
try:
rval['results'] = json.loads(stdout)
except ValueError as err:
- if "No JSON object could be decoded" in str(err):
- err = str(err)
+ if "No JSON object could be decoded" in err.args:
+ err = err.args
elif output_type == 'raw':
rval['results'] = stdout
if self.verbose:
- print(stdout)
- print(stderr)
+ print("STDOUT: {0}".format(stdout))
+ print("STDERR: {0}".format(stderr))
if err:
rval.update({"err": err,