Fix gnt-* command with --submit
authorIustin Pop <iustin@google.com>
Thu, 23 Oct 2008 14:19:13 +0000 (14:19 +0000)
committerIustin Pop <iustin@google.com>
Thu, 23 Oct 2008 14:19:13 +0000 (14:19 +0000)
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

index 7832b29..b95b6ae 100644 (file)
@@ -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)