From: Jeremy Stanley Date: Wed, 7 Oct 2020 15:54:20 +0000 (+0000) Subject: Recast is_restricted() to a bool X-Git-Tag: 0.3.0 X-Git-Url: https://mudpy.org/gitweb?a=commitdiff_plain;h=04313b09432e5ca514f0d7346717eaec862b7027;p=mudpy.git 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. --- 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."""