16 lines
501 B
Python
Executable File
16 lines
501 B
Python
Executable File
#!/usr/bin/env python3
|
|
import os
|
|
import pathlib
|
|
import signal
|
|
import sys
|
|
|
|
sys.path.insert(0, str(pathlib.Path(__file__).resolve().parent))
|
|
|
|
from mutate_changes import main
|
|
|
|
# Python ends on SIGTERM or SIGHUP without running a finally, which would leave the scratch copy and the tool running. As
|
|
# SystemExit, the run unwinds as on Ctrl-C.
|
|
for number in (signal.SIGHUP, signal.SIGTERM):
|
|
signal.signal(number, lambda number, frame: sys.exit(128 + number))
|
|
sys.exit(main.main(sys.argv[1:], os.environ))
|