diff options
Diffstat (limited to 'bin/mirrorselect')
-rwxr-xr-x | bin/mirrorselect | 29 |
1 files changed, 14 insertions, 15 deletions
diff --git a/bin/mirrorselect b/bin/mirrorselect index 7f019e3..3440935 100755 --- a/bin/mirrorselect +++ b/bin/mirrorselect @@ -32,29 +32,28 @@ import sys # This block ensures that ^C interrupts are handled quietly. try: - import signal + import signal - def exithandler(signum,frame): - signal.signal(signal.SIGINT, signal.SIG_IGN) - signal.signal(signal.SIGTERM, signal.SIG_IGN) - print('Caught signal %s. Exiting' % signum) - sys.exit(1) + def exithandler(signum, frame): + signal.signal(signal.SIGINT, signal.SIG_IGN) + signal.signal(signal.SIGTERM, signal.SIG_IGN) + print("Caught signal %s. Exiting" % signum) + sys.exit(1) - signal.signal(signal.SIGINT, exithandler) - signal.signal(signal.SIGTERM, exithandler) - signal.signal(signal.SIGPIPE, signal.SIG_DFL) + signal.signal(signal.SIGINT, exithandler) + signal.signal(signal.SIGTERM, exithandler) + signal.signal(signal.SIGPIPE, signal.SIG_DFL) except KeyboardInterrupt: - print() - sys.exit(1) + print() + sys.exit(1) from mirrorselect.main import MirrorSelect try: - MirrorSelect().main(sys.argv) + MirrorSelect().main(sys.argv) except KeyboardInterrupt: - print("Aborted.") - sys.exit(130) + print("Aborted.") + sys.exit(130) sys.exit(0) - |