mirror of https://github.com/ceph/ceph-ansible.git
validate: fix notario error
Typical error: ``` AttributeError: 'Invalid' object has no attribute 'message' ``` As of python 2.6, `BaseException.message` has been deprecated. When using python3, it fails because it has been removed. Let's use `str(error)` instead so we don't hit this error when using python3. Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>pull/3893/head
parent
b2f242660e
commit
5aa2779461
|
@ -111,7 +111,7 @@ class ActionModule(ActionBase):
|
||||||
display.error(msg)
|
display.error(msg)
|
||||||
reason = "[{}] Reason: {}".format(host, error.reason)
|
reason = "[{}] Reason: {}".format(host, error.reason)
|
||||||
try:
|
try:
|
||||||
if "schema is missing" not in error.message:
|
if "schema is missing" not str(error):
|
||||||
for i in range(0, len(error.path)):
|
for i in range(0, len(error.path)):
|
||||||
if i == 0:
|
if i == 0:
|
||||||
given = "[{}] Given value for {}".format(
|
given = "[{}] Given value for {}".format(
|
||||||
|
|
Loading…
Reference in New Issue