mirror of
https://github.com/ValdikSS/blockcheck.git
synced 2026-09-14 11:05:48 +05:00
Re-raise SystemExit and KeyboardInterrupt to catch it in caller function
This commit is contained in:
parent
4c0d9f663f
commit
b2b99d20d4
@ -261,6 +261,9 @@ def _get_url(url, proxy=None, ip=None):
|
||||
if 'CERTIFICATE_VERIFY_FAILED' in str(e):
|
||||
return (-1, '')
|
||||
return (0, '')
|
||||
except (KeyboardInterrupt, SystemExit) as e:
|
||||
# re-raise exception to send it to caller function
|
||||
raise e
|
||||
except Exception as e:
|
||||
print("[☠] Неизвестная ошибка:", repr(e))
|
||||
return (0, '')
|
||||
@ -662,6 +665,9 @@ def test_dpi():
|
||||
print("\tПробуем способ «{}» на {}".format(testname, dpisite))
|
||||
try:
|
||||
result = _dpi_send(test.get('ip'), 80, test.get('data'), test.get('fragment_size'), test.get('fragment_count'))
|
||||
except (KeyboardInterrupt, SystemExit) as e:
|
||||
# re-raise exception to send it to caller function
|
||||
raise e
|
||||
except Exception as e:
|
||||
print("[☠] Ошибка:", repr(e))
|
||||
else:
|
||||
|
||||
Loading…
Reference in New Issue
Block a user