From 6655d41491372751ae69012036634a6a1de5031b Mon Sep 17 00:00:00 2001 From: yoshiko2 Date: Thu, 2 Dec 2021 14:01:35 +0800 Subject: [PATCH] Optimize error output & adjust code sequence #2 --- ADC_function.py | 3 --- AV_Data_Capture.py | 5 +++++ 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/ADC_function.py b/ADC_function.py index adac28e..83842e6 100644 --- a/ADC_function.py +++ b/ADC_function.py @@ -62,9 +62,6 @@ def get_html(url, cookies: dict = None, ua: str = None, return_type: str = None, else: print("[-]" + errors) print('[-]Connect Failed! Please check your Proxy or Network!') - print("[-] --- AUTO EXIT AFTER 30s !!! --- ") - time.sleep(30) - os._exit(-1) raise Exception('Connect Failed') diff --git a/AV_Data_Capture.py b/AV_Data_Capture.py index 0983bf4..7d16798 100755 --- a/AV_Data_Capture.py +++ b/AV_Data_Capture.py @@ -451,6 +451,8 @@ def main(): # Parse command line args single_file_path, custom_number, logdir, regexstr, zero_op = argparse_function(version) + + main_mode = conf.main_mode() if not main_mode in (1, 2, 3): print(f"[-]Main mode must be 1 or 2 or 3! You can run '{os.path.basename(sys.argv[0])} --help' for more help.") @@ -508,6 +510,9 @@ def main(): print(f"[+] [{i}/{len(res)}] Mapping Table Downloaded to {fp}") else: print(f"[-] [{i}/{len(res)}] Mapping Table Download failed") + print("[-] --- AUTO EXIT AFTER 30s !!! --- ") + time.sleep(30) + os._exit(-1) # create OpenCC converter ccm = conf.cc_convert_mode()