From ae0fa0c447dea43d03684ff740a5083da5d8cb38 Mon Sep 17 00:00:00 2001 From: Aanand Prasad Date: Thu, 19 Dec 2013 12:36:38 +0000 Subject: [PATCH] Hide stack traces for Docker API errors --- plum/cli/main.py | 4 ++++ 1 file changed, 4 insertions(+) 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