Hide stack traces for Docker API errors

This commit is contained in:
Aanand Prasad 2013-12-19 12:36:38 +00:00
parent fb69512008
commit ae0fa0c447
1 changed files with 4 additions and 0 deletions

View File

@ -12,6 +12,7 @@ from ..service_collection import ServiceCollection
from .command import Command
from .log_printer import LogPrinter
from docker.client import APIError
from .errors import UserError
from .docopt_command import NoSuchCommand
@ -43,6 +44,9 @@ def main():
log.error("")
log.error("\n".join(parse_doc_section("commands:", getdoc(e.supercommand))))
exit(1)
except APIError, e:
log.error(e.explanation)
exit(1)
# stolen from docopt master