Hacking: enable extensions H106, H203 and H904
[H106] Don't put vim configuration in source files.
[H203] Use assertIs(Not)None to check for None.
[H904] Delay string interpolations at logging calls.
This change makes Patrole's hacking consistent with
Tempest's [0][1].
[0] https://review.openstack.org/#/c/408211/
[1] https://review.openstack.org/#/c/408066/
Change-Id: Ia56f66b4ab7e1eea6a8bfea05bf52865be13430c
diff --git a/patrole_tempest_plugin/rbac_rule_validation.py b/patrole_tempest_plugin/rbac_rule_validation.py
index d77b2d6..60a0f10 100644
--- a/patrole_tempest_plugin/rbac_rule_validation.py
+++ b/patrole_tempest_plugin/rbac_rule_validation.py
@@ -104,7 +104,7 @@
(role, rule))
LOG.error(msg)
raise exceptions.Forbidden(
- "%s exception was: %s" % (msg, e))
+ "%s Exception was: %s" % (msg, e))
except Exception as e:
exc_info = sys.exc_info()
error_details = exc_info[1].__str__()
@@ -115,7 +115,7 @@
six.reraise(exc_info[0], exc_info[0](msg), exc_info[2])
else:
if not allowed:
- LOG.error("Role %s was allowed to perform %s" %
+ LOG.error("Role %s was allowed to perform %s",
(role, rule))
raise rbac_exceptions.RbacOverPermission(
"OverPermission: Role %s was allowed to perform %s" %