From b5762e2aabcdc65a71070c34acf5dc024ee3ec27 Mon Sep 17 00:00:00 2001 From: Guido Trotter <ultrotter@google.com> Date: Fri, 9 Oct 2009 11:52:02 +0100 Subject: [PATCH] cli: add a timeout option Signed-off-by: Guido Trotter <ultrotter@google.com> Reviewed-by: Michael Hanselmann <hansmi@google.com> --- lib/cli.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/cli.py b/lib/cli.py index 2d6e7f74a..b86452790 100644 --- a/lib/cli.py +++ b/lib/cli.py @@ -111,6 +111,7 @@ __all__ = [ "STATIC_OPT", "SYNC_OPT", "TAG_SRC_OPT", + "TIMEOUT_OPT", "USEUNITS_OPT", "VERBOSE_OPT", "VG_NAME_OPT", @@ -816,6 +817,9 @@ NOSHUTDOWN_OPT = cli_option("","--noshutdown", dest="shutdown", action="store_false", default=True, help="Don't shutdown the instance (unsafe)") +TIMEOUT_OPT = cli_option("--timeout", dest="timeout", type="int", + default=constants.DEFAULT_SHUTDOWN_TIMEOUT, + help="Maximum time to wait") def _ParseArgs(argv, commands, aliases): -- GitLab