Add quiet option to resubmit, if not quiet print info about task about to be resubmitted.

This is for ticket #97
This commit is contained in:
Jesse Keating 2008-06-03 14:34:03 -04:00
parent 676311e721
commit f3dedd8b31

View file

@ -783,12 +783,16 @@ def handle_resubmit(options, session, args):
parser.add_option("--nowait", action="store_true", help=_("Don't wait on task"))
parser.add_option("--nowatch", action="store_true", dest="nowait",
help=_("An alias for --nowait"))
parser.add_option("--quiet", action="store_true", help=_("Do not print the task information"), default=options.quiet)
(options, args) = parser.parse_args(args)
if len(args) < 1:
parser.error(_("Please specify a task ID"))
assert False
activate_session(session)
taskID = args[0]
if not options.quiet:
print "Resubmitting the following task:"
_printTaskInfo(session, int(taskID), 0, False, True)
newID = session.resubmitTask(int(taskID))
print "Resubmitted task %s as new task %s" % (taskID, newID)
if _running_in_bg() or options.nowait: