Segmenting the Command methods better.
This commit is contained in:
parent
e09be824ca
commit
597a0dbee2
2 changed files with 15 additions and 0 deletions
|
|
@ -408,6 +408,15 @@ class Command(object, metaclass=CommandMeta):
|
||||||
module for which object properties are available (beyond those
|
module for which object properties are available (beyond those
|
||||||
set in self.parse())
|
set in self.parse())
|
||||||
|
|
||||||
|
"""
|
||||||
|
self.get_command_info()
|
||||||
|
|
||||||
|
def get_command_info(self):
|
||||||
|
"""
|
||||||
|
This is the default output of func() if no func() overload is done.
|
||||||
|
Provided here as a separate method so that it can be called for debugging
|
||||||
|
purposes when making commands.
|
||||||
|
|
||||||
"""
|
"""
|
||||||
variables = "\n".join(
|
variables = "\n".join(
|
||||||
" |w{}|n ({}): {}".format(key, type(val), val) for key, val in self.__dict__.items()
|
" |w{}|n ({}): {}".format(key, type(val), val) for key, val in self.__dict__.items()
|
||||||
|
|
|
||||||
|
|
@ -208,6 +208,12 @@ class MuxCommand(Command):
|
||||||
by the cmdhandler right after self.parser() finishes, and so has access
|
by the cmdhandler right after self.parser() finishes, and so has access
|
||||||
to all the variables defined therein.
|
to all the variables defined therein.
|
||||||
"""
|
"""
|
||||||
|
self.get_command_info()
|
||||||
|
|
||||||
|
def get_command_info(self):
|
||||||
|
"""
|
||||||
|
Update of parent class's get_command_info() for MuxCommand.
|
||||||
|
"""
|
||||||
variables = "\n".join(
|
variables = "\n".join(
|
||||||
" |w{}|n ({}): {}".format(key, type(val), val) for key, val in self.__dict__.items()
|
" |w{}|n ({}): {}".format(key, type(val), val) for key, val in self.__dict__.items()
|
||||||
)
|
)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue