Fix dep-warning message on persistent cmdset.add kwarg

This commit is contained in:
Griatch 2022-02-09 19:38:52 +01:00
parent bd3e31bf3c
commit a58b667bb0

View file

@ -451,10 +451,9 @@ class CmdSetHandler(object):
"""
if "permanent" in kwargs:
logger.log_dep(
"obj.cmdset.add() kwarg 'permanent' has changed name to "
"'persistent' and now defaults to True."
"obj.cmdset.add() kwarg 'permanent' has changed name to 'persistent'."
)
persistent = kwargs["permanent"] if persistent is None else persistent
persistent = kwargs["permanent"] if persistent is False else persistent
if not (isinstance(cmdset, str) or utils.inherits_from(cmdset, CmdSet)):
string = _("Only CmdSets can be added to the cmdsethandler!")