mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
[enh] remove timeout from cli interface
This commit is contained in:
parent
2cd18d8786
commit
12c66d1530
1 changed files with 6 additions and 1 deletions
|
@ -66,6 +66,10 @@ def _parse_cli_args():
|
||||||
action='store_true', default=False,
|
action='store_true', default=False,
|
||||||
help="Don't produce any output",
|
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',
|
parser.add_argument('--admin-password',
|
||||||
default=None, dest='password', metavar='PASSWORD',
|
default=None, dest='password', metavar='PASSWORD',
|
||||||
help="The admin password to use to authenticate",
|
help="The admin password to use to authenticate",
|
||||||
|
@ -209,6 +213,7 @@ if __name__ == '__main__':
|
||||||
ret = moulinette.cli(
|
ret = moulinette.cli(
|
||||||
_retrieve_namespaces(), args,
|
_retrieve_namespaces(), args,
|
||||||
use_cache=opts.use_cache, output_as=opts.output_as,
|
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)
|
sys.exit(ret)
|
||||||
|
|
Loading…
Add table
Reference in a new issue