Refactor command class hierarchy to remove an unnecessary intermediate base class Command.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
This commit is contained in:
parent
19271898de
commit
aefb7a44b2
3 changed files with 49 additions and 45 deletions
|
|
@ -25,9 +25,6 @@ class DocoptCommand(object):
|
|||
def dispatch(self, argv, global_options):
|
||||
self.perform_command(*self.parse(argv, global_options))
|
||||
|
||||
def perform_command(self, options, handler, command_options):
|
||||
handler(command_options)
|
||||
|
||||
def parse(self, argv, global_options):
|
||||
options = docopt_full_help(getdoc(self), argv, **self.docopt_options())
|
||||
command = options['COMMAND']
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue