From b8305cbbf0ddf9bec3ba580531eeb2aadf04c921 Mon Sep 17 00:00:00 2001 From: Ding-Yi Chen Date: Mon, 16 Apr 2018 18:25:39 +1000 Subject: [PATCH] fix deploy_local_war --- ZanataWar.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/ZanataWar.py b/ZanataWar.py index c4a5620..1010f5b 100755 --- a/ZanataWar.py +++ b/ZanataWar.py @@ -139,9 +139,9 @@ def deploy_local_war(war=None): """Deploy a build local WAR to zanata server. This assumes login as root""" if not war: - if not args.local_path: - raise AssertionError("args.local_path is missing") - war = ZanataWar(local_path=args.local_path) + if not args.war_file: + raise AssertionError("args.war_file is missing") + war = ZanataWar(local_path=args.war_file) ssh_host = SshHost(args.host, args.identity_file) ssh_host.run_check_call("systemctl stop eap7-standalone", True) @@ -205,7 +205,10 @@ def parse(): 'deploy-local-war', help="""deploy the existing local WAR to server (assuming you are able to sudo)""", - parents=[war_parent_parser, ssh_parent_parser]) + parents=[ssh_parent_parser]) + deploy_local_war_parser.add_argument( + 'war_file', type=str, + help='Local WAR file to be upload') deploy_local_war_parser.set_defaults(func=deploy_local_war) deploy_parser = subparsers.add_parser(