From d8353c3a25119325abf86327d9e378a5572de96f Mon Sep 17 00:00:00 2001
From: Iustin Pop <iustin@google.com>
Date: Thu, 23 Oct 2008 14:19:13 +0000
Subject: [PATCH] Fix gnt-* command with --submit

Currently we don't catch the JobSubmittedException (although the code to
format it nicely is there). The patch adds the exception name to the
catch list and makes --submit work.

Reviewed-by: imsnah
---
 lib/cli.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lib/cli.py b/lib/cli.py
index 7832b2902..b95b6ae07 100644
--- a/lib/cli.py
+++ b/lib/cli.py
@@ -725,7 +725,8 @@ def GenericMain(commands, override=None, aliases=None):
 
   try:
     result = func(options, args)
-  except (errors.GenericError, luxi.ProtocolError), err:
+  except (errors.GenericError, luxi.ProtocolError,
+          JobSubmittedException), err:
     result, err_msg = FormatError(err)
     logging.exception("Error durring command processing")
     ToStderr(err_msg)
-- 
GitLab