Structure handlers to allow .get() to return lists
See #1154. In the end I didn't modify the Attributehandler and TagHandler like this, instead I added the `return_list` argument for cases when one wants a guaranteed return.
This commit is contained in:
parent
05a3d0435d
commit
92df3ce5ae
13 changed files with 86 additions and 1608 deletions
|
|
@ -544,9 +544,9 @@ class CmdSetHandler(object):
|
|||
# legacy alias
|
||||
delete_default = remove_default
|
||||
|
||||
def all(self):
|
||||
def get(self):
|
||||
"""
|
||||
Show all cmdsets.
|
||||
Get all cmdsets.
|
||||
|
||||
Returns:
|
||||
cmdsets (list): All the command sets currently in the handler.
|
||||
|
|
@ -554,6 +554,9 @@ class CmdSetHandler(object):
|
|||
"""
|
||||
return self.cmdset_stack
|
||||
|
||||
# backwards-compatible alias
|
||||
all = get
|
||||
|
||||
def clear(self):
|
||||
"""
|
||||
Removes all Command Sets from the handler except the default one
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue