From e5642bd8b71d7a4a413565c95f39399a097b347d Mon Sep 17 00:00:00 2001 From: Aanand Prasad Date: Wed, 18 Dec 2013 15:13:02 +0000 Subject: [PATCH] Show a sensible error when an unknown service name is given to 'run' --- plum/cli/main.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/plum/cli/main.py b/plum/cli/main.py index 5650cdeb33..f4ba57666b 100644 --- a/plum/cli/main.py +++ b/plum/cli/main.py @@ -87,6 +87,8 @@ class TopLevelCommand(Command): Usage: run SERVICE COMMAND [ARGS...] """ service = self.service_collection.get(options['SERVICE']) + if service is None: + raise UserError("No such service: %s" % options['SERVICE']) container_options = { 'command': [options['COMMAND']] + options['ARGS'], }