From 31b37201c80ae99bdb7c878e1358b460594e2cdc Mon Sep 17 00:00:00 2001 From: David Ames Date: Mon, 4 Dec 2017 19:00:57 +0000 Subject: [PATCH] Py3 fixes Charm-helpers sync to include python3 bug fixes. Change-Id: I00619d8d32fc6c1366819ab2d6077b0405c1cbbc --- hooks/charmhelpers/contrib/storage/linux/ceph.py | 8 ++++---- tests/charmhelpers/contrib/storage/linux/ceph.py | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/hooks/charmhelpers/contrib/storage/linux/ceph.py b/hooks/charmhelpers/contrib/storage/linux/ceph.py index 39231612..0d9bacfd 100644 --- a/hooks/charmhelpers/contrib/storage/linux/ceph.py +++ b/hooks/charmhelpers/contrib/storage/linux/ceph.py @@ -377,12 +377,12 @@ def get_mon_map(service): try: return json.loads(mon_status) except ValueError as v: - log("Unable to parse mon_status json: {}. Error: {}".format( - mon_status, v.message)) + log("Unable to parse mon_status json: {}. Error: {}" + .format(mon_status, str(v))) raise except CalledProcessError as e: - log("mon_status command failed with message: {}".format( - e.message)) + log("mon_status command failed with message: {}" + .format(str(e))) raise diff --git a/tests/charmhelpers/contrib/storage/linux/ceph.py b/tests/charmhelpers/contrib/storage/linux/ceph.py index 39231612..0d9bacfd 100644 --- a/tests/charmhelpers/contrib/storage/linux/ceph.py +++ b/tests/charmhelpers/contrib/storage/linux/ceph.py @@ -377,12 +377,12 @@ def get_mon_map(service): try: return json.loads(mon_status) except ValueError as v: - log("Unable to parse mon_status json: {}. Error: {}".format( - mon_status, v.message)) + log("Unable to parse mon_status json: {}. Error: {}" + .format(mon_status, str(v))) raise except CalledProcessError as e: - log("mon_status command failed with message: {}".format( - e.message)) + log("mon_status command failed with message: {}" + .format(str(e))) raise