From 3b59b8a74388427be4e06d0dad558d597ee34ef4 Mon Sep 17 00:00:00 2001 From: Jeremy Stanley Date: Wed, 7 Oct 2020 15:54:20 +0000 Subject: [PATCH] Recast is_restricted() to a bool When returning from the is_restricted function, just coerce the lookups to a boolean type rather than forcing False defaults for each facet. --- mudpy/misc.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/mudpy/misc.py b/mudpy/misc.py index 7051ac9..c0f73a1 100644 --- a/mudpy/misc.py +++ b/mudpy/misc.py @@ -186,8 +186,7 @@ class Element: def is_restricted(self): """Boolean check whether command is administrative or debugging.""" - return self.get( - "administrative", False) or self.get("debugging", False) + return bool(self.get("administrative") or self.get("debugging")) def is_admin(self): """Boolean check whether an actor is controlled by an admin owner.""" -- 2.11.0