From 87c08c994161d21a649ea23ee7e488e06bdc397d Mon Sep 17 00:00:00 2001 From: WillyPillow Date: Fri, 7 Aug 2020 22:58:17 +0800 Subject: [PATCH] qvm-template: Fix missing args for install operations. --- qubesadmin/tools/qvm_template.py | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/qubesadmin/tools/qvm_template.py b/qubesadmin/tools/qvm_template.py index f8fed138..00b40686 100644 --- a/qubesadmin/tools/qvm_template.py +++ b/qubesadmin/tools/qvm_template.py @@ -71,14 +71,6 @@ def parser_add_command(cmd, help_str, add_help=True): help='Set repository metadata as expired before running the command.') parser_main.add_argument('--cachedir', default=CACHE_DIR, help='Specify cache directory.') - # qvm-template download - parser_download = parser_add_command('download', - help_str='Download template package.') - parser_download.add_argument('--downloaddir', default='.', - help='Specify download directory.') - parser_download.add_argument('--retries', default=5, type=int, - help='Specify number of retries for downloads.') - parser_download.add_argument('templates', nargs='*', metavar='TEMPLATE') # qvm-template {install,reinstall,downgrade,upgrade} parser_install = parser_add_command('install', help_str='Install template packages.') @@ -97,6 +89,16 @@ def parser_add_command(cmd, help_str, add_help=True): parser_x.add_argument('--allow-pv', action='store_true', help='Allow setting virt_mode to pv in configuration file.') parser_x.add_argument('templates', nargs='*', metavar='TEMPLATE') + # qvm-template download + parser_download = parser_add_command('download', + help_str='Download template package.') + for parser_x in [parser_install, parser_reinstall, + parser_downgrade, parser_upgrade, parser_download]: + parser_x.add_argument('--downloaddir', default='.', + help='Specify download directory.') + parser_x.add_argument('--retries', default=5, type=int, + help='Specify number of retries for downloads.') + parser_download.add_argument('templates', nargs='*', metavar='TEMPLATE') # qvm-template {list,info} parser_list = parser_add_command('list', help_str='List templates.')