Skip to content

Commit e8599d5

Browse files
committed
Do not crash on KeyboardInterrupt (Fixes #6)
1 parent 034791c commit e8599d5

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

git_qdiff.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,8 @@ def main():
7474
qdiff(left, right)
7575
except Exception as e:
7676
sys.exit(str(e))
77+
except KeyboardInterrupt:
78+
pass
7779
sys.exit(0)
7880

7981
# TODO: ensure infinite subcalls is not possible
@@ -84,3 +86,5 @@ def main():
8486
except subprocess.CalledProcessError as e:
8587
sys.stderr.write(str(e))
8688
sys.exit(e.returncode)
89+
except KeyboardInterrupt:
90+
sys.exit(0)

0 commit comments

Comments
 (0)