Handle SIGINT

This commit is contained in:
Kristóf Tóth 2018-04-14 18:24:14 +02:00
parent 9ff5abce12
commit 4f82f5f8f0

View File

@ -51,6 +51,9 @@ class imgrate:
if __name__ == '__main__': if __name__ == '__main__':
from os import remove from os import remove
from sys import exit from sys import exit
from signal import signal, SIGINT
signal(SIGINT, lambda a, b: exit('\nExiting!'))
def parse_arguments(): def parse_arguments():
ap = ArgumentParser(description='Find the best quality one among similar images.' ap = ArgumentParser(description='Find the best quality one among similar images.'