From 12c66d153096b13abe99e8978eb35cd6c2edc2f6 Mon Sep 17 00:00:00 2001 From: Laurent Peuch Date: Sat, 3 Dec 2016 00:36:22 +0100 Subject: [PATCH] [enh] remove timeout from cli interface --- bin/yunohost | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/bin/yunohost b/bin/yunohost index b2a0e4b1b..0bf2c004c 100755 --- a/bin/yunohost +++ b/bin/yunohost @@ -66,6 +66,10 @@ def _parse_cli_args(): action='store_true', default=False, help="Don't produce any output", ) + parser.add_argument('--timeout', + type=int, default=None, + help="Number of seconds before this command will timeout because it can't acquire the lock (meaning that another command is currently running), by default there is no timeout and the command will wait until it can get the lock", + ) parser.add_argument('--admin-password', default=None, dest='password', metavar='PASSWORD', help="The admin password to use to authenticate", @@ -209,6 +213,7 @@ if __name__ == '__main__': ret = moulinette.cli( _retrieve_namespaces(), args, use_cache=opts.use_cache, output_as=opts.output_as, - password=opts.password, parser_kwargs={'top_parser': parser} + password=opts.password, parser_kwargs={'top_parser': parser}, + timeout=opts.timeout, ) sys.exit(ret)