diff --git a/plum/cli/main.py b/plum/cli/main.py index 8dd465556b..2de1cd136c 100644 --- a/plum/cli/main.py +++ b/plum/cli/main.py @@ -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