Handle SIGINT

This commit is contained in:
Kristóf Tóth 2018-04-14 18:24:14 +02:00
parent 9ff5abce12
commit 4f82f5f8f0
1 changed files with 3 additions and 0 deletions

View File

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