diff options
author | Sam James <sam@gentoo.org> | 2023-08-07 01:05:27 +0100 |
---|---|---|
committer | Sam James <sam@gentoo.org> | 2023-08-07 01:06:39 +0100 |
commit | f1f43b235cec228fa0e478f389225729ae2ea3f8 (patch) | |
tree | f7122b3ad25a751ede7f486a9fb96a7359472a16 /bin/mirrorselect | |
parent | Modernise shebang (diff) | |
download | mirrorselect-f1f43b235cec228fa0e478f389225729ae2ea3f8.tar.gz mirrorselect-f1f43b235cec228fa0e478f389225729ae2ea3f8.tar.bz2 mirrorselect-f1f43b235cec228fa0e478f389225729ae2ea3f8.zip |
Reformat with `black`
Signed-off-by: Sam James <sam@gentoo.org>
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) - |