From 022c0a6ccd7f34aacb4884ace2c1548773047056 Mon Sep 17 00:00:00 2001 From: fa0311 Date: Sat, 12 Mar 2022 05:34:46 +0900 Subject: [PATCH] update arg --- DMMGamePlayerFastLauncher.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/DMMGamePlayerFastLauncher.py b/DMMGamePlayerFastLauncher.py index 97f852a..d033cd7 100644 --- a/DMMGamePlayerFastLauncher.py +++ b/DMMGamePlayerFastLauncher.py @@ -20,8 +20,8 @@ "--dmmgameplayer-path", default="C:/Program Files/DMMGamePlayer/DMMGamePlayer.exe", ) -argpar.add_argument("--kill", default=True) -argpar.add_argument("--debug", default=False) +argpar.add_argument("--non-kill", action='store_true') +argpar.add_argument("--debug", action='store_true') arg = argpar.parse_args() headers = { @@ -58,10 +58,10 @@ def dgp5_session(): ) if 'Header key: "cookie"' in text: cookie = re.findall(r'"(.*?)"', text)[1] - if arg.kill: + if not arg.non_kill: process.terminate() return install_data, cookie - raise Exception("DMMGamePlayerが起動できませんでした") + raise Exception("DMMGamePlayerの実行中にエラーが発生しました\n既に実行されているか実行中に終了した可能性があります") install_data, headers["cookie"] = dgp5_session()