Fix dep-warning message on persistent cmdset.add kwarg
This commit is contained in:
parent
bd3e31bf3c
commit
a58b667bb0
1 changed files with 2 additions and 3 deletions
|
|
@ -451,10 +451,9 @@ class CmdSetHandler(object):
|
||||||
"""
|
"""
|
||||||
if "permanent" in kwargs:
|
if "permanent" in kwargs:
|
||||||
logger.log_dep(
|
logger.log_dep(
|
||||||
"obj.cmdset.add() kwarg 'permanent' has changed name to "
|
"obj.cmdset.add() kwarg 'permanent' has changed name to 'persistent'."
|
||||||
"'persistent' and now defaults to True."
|
|
||||||
)
|
)
|
||||||
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)):
|
if not (isinstance(cmdset, str) or utils.inherits_from(cmdset, CmdSet)):
|
||||||
string = _("Only CmdSets can be added to the cmdsethandler!")
|
string = _("Only CmdSets can be added to the cmdsethandler!")
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue