From 92961cfa61099b68c000d3f09f19a6325f486edb Mon Sep 17 00:00:00 2001 From: isummer Date: Wed, 12 Oct 2022 15:08:58 +0800 Subject: [PATCH] =?UTF-8?q?flyapps-cli=E5=A2=9E=E5=8A=A0=E5=AE=B9=E5=99=A8?= =?UTF-8?q?=E8=AE=BF=E9=97=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- fir_ser/cli.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/fir_ser/cli.py b/fir_ser/cli.py index ee890fa..232d411 100644 --- a/fir_ser/cli.py +++ b/fir_ser/cli.py @@ -360,6 +360,7 @@ if __name__ == '__main__': Example: \r\n """ ) + parser.add_argument('-host', '--host', nargs="?", const=True, type=str, help="服务器地址") parser.add_argument('-s', '--short', nargs="?", const=True, type=str, help="短连接") parser.add_argument('-cl', '--change_log', nargs="?", const=True, type=str, help="更新日志") parser.add_argument('-n', '--name', nargs="?", const=True, type=str, help="名称") @@ -369,6 +370,8 @@ if __name__ == '__main__': parser.add_argument('-f', '--filepath', nargs="+", type=str, help="filepath") parser.add_argument('-d', '--dir_path', nargs="+", type=str, help="dir_path") args = parser.parse_args() + if not args.host: + args.host = domain if args.token and args.write_token_info: write_token(args.token) if args.install_depends: @@ -380,7 +383,7 @@ if __name__ == '__main__': if token: token = token.replace('\r', '').replace('\n', '') if not token: raise Exception('token not exist') - fly_obj = FLYCliSer(domain, token) + fly_obj = FLYCliSer(args.host, token) file_path_list = [] if args.filepath is not None and len(args.filepath) > 0: for args_filepath in args.filepath: