implement exec

Resolves #593

Signed-off-by: Tomas Tomecek <ttomecek@redhat.com>
This commit is contained in:
Tomas Tomecek 2015-09-10 13:17:55 +02:00
parent 1502c5a14d
commit d28c5dda92
5 changed files with 110 additions and 1 deletions

View file

@ -43,6 +43,10 @@ class DocoptCommand(object):
def get_handler(self, command):
command = command.replace('-', '_')
# we certainly want to have "exec" command, since that's what docker client has
# but in python exec is a keyword
if command == "exec":
command = "exec_command"
if not hasattr(self, command):
raise NoSuchCommand(command, self)