From 5aa27794615e7d4521b1dbf1444b61388aacb852 Mon Sep 17 00:00:00 2001 From: Guillaume Abrioux Date: Tue, 23 Apr 2019 15:19:26 +0200 Subject: [PATCH] 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 --- plugins/actions/validate.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/actions/validate.py b/plugins/actions/validate.py index ebedd3ed8..4c979f435 100644 --- a/plugins/actions/validate.py +++ b/plugins/actions/validate.py @@ -111,7 +111,7 @@ class ActionModule(ActionBase): display.error(msg) reason = "[{}] Reason: {}".format(host, error.reason) try: - if "schema is missing" not in error.message: + if "schema is missing" not str(error): for i in range(0, len(error.path)): if i == 0: given = "[{}] Given value for {}".format(