From 3740e2d48b72e534faa208de9e59dfbddeea663e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= Date: Mon, 29 Oct 2018 20:22:35 +0100 Subject: [PATCH] api: make enforce() static It doesn't use 'self'. And pylint complains. --- qubes/api/__init__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/qubes/api/__init__.py b/qubes/api/__init__.py index bdb808bb..20cde2a5 100644 --- a/qubes/api/__init__.py +++ b/qubes/api/__init__.py @@ -196,7 +196,8 @@ class AbstractQubesAPI(object): return apply_filters(iterable, self.fire_event_for_permission(**kwargs)) - def enforce(self, predicate): + @staticmethod + def enforce(predicate): '''An assert replacement, but works even with optimisations.''' if not predicate: raise PermissionDenied()