Handle SIGINT
This commit is contained in:
parent
9ff5abce12
commit
4f82f5f8f0
@ -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.'
|
||||||
|
Loading…
Reference in New Issue
Block a user