mirror of
https://github.com/tiennm99/mtprotoproxy.git
synced 2026-10-12 18:16:33 +00:00
check if signal exists before placing it. It can absent in some OSes, like Windows
This commit is contained in:
1 parent
7eea7d3201
commit
71e3206b19
1 file changed
+5
-5
+5
-5
@@ -66,12 +66,12 @@ except (ValueError, OSError):
|
||||
except ImportError:
|
||||
pass
|
||||
|
||||
if hasattr(signal, 'SIGUSR1'):
|
||||
def debug_signal(signum, frame):
|
||||
import pdb
|
||||
pdb.set_trace()
|
||||
|
||||
def debug_signal(signum, frame):
|
||||
import pdb
|
||||
pdb.set_trace()
|
||||
|
||||
signal.signal(signal.SIGUSR1, debug_signal)
|
||||
signal.signal(signal.SIGUSR1, debug_signal)
|
||||
|
||||
if len(sys.argv) > 1:
|
||||
config = runpy.run_path(sys.argv[1])
|
||||
|
||||
Reference in new issue
Block a user