Catch ctrl+c to commit before quitting.
This commit is contained in:
parent
9b0d8fdfa0
commit
cb4b6a3882
1 changed files with 4 additions and 1 deletions
|
@ -535,7 +535,10 @@ def update_argparse(args):
|
||||||
else:
|
else:
|
||||||
bigchunk_range = pixel_range_to_bigchunk_range(*coordinates)
|
bigchunk_range = pixel_range_to_bigchunk_range(*coordinates)
|
||||||
chunks = download_bigchunk_range(*bigchunk_range, threads=args.threads)
|
chunks = download_bigchunk_range(*bigchunk_range, threads=args.threads)
|
||||||
insert_chunks(chunks)
|
try:
|
||||||
|
insert_chunks(chunks)
|
||||||
|
except KeyboardInterrupt:
|
||||||
|
sql.commit()
|
||||||
|
|
||||||
parser = argparse.ArgumentParser()
|
parser = argparse.ArgumentParser()
|
||||||
subparsers = parser.add_subparsers()
|
subparsers = parser.add_subparsers()
|
||||||
|
|
Loading…
Reference in a new issue