summaryrefslogtreecommitdiffstats
path: root/make/df-verify.py
diff options
context:
space:
mode:
authorBradley Sepos <[email protected]>2016-05-24 18:44:12 -0400
committerBradley Sepos <[email protected]>2016-05-25 15:45:05 -0400
commit8507acecae257bf42019a0fa2662d71277bcc6ce (patch)
treeb17096260e9a2ea9e96a9d8bd13ccdf246a0795a /make/df-verify.py
parent3bf86382ab351ac0db02dcef41ed27502ff4fb41 (diff)
build: Add basic termination signal handling to df-*.py.
Diffstat (limited to 'make/df-verify.py')
-rw-r--r--make/df-verify.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/make/df-verify.py b/make/df-verify.py
index a06829e56..51cbf5bdb 100644
--- a/make/df-verify.py
+++ b/make/df-verify.py
@@ -10,6 +10,7 @@
import hashlib
import os
+import signal
import sys
sys.dont_write_bytecode = True
@@ -18,6 +19,15 @@ import hb_distfile
###############################################################################
+def signal_handler(signal, frame):
+ sys.stderr.write('^C')
+ sys.exit(1)
+
+signal.signal(signal.SIGINT, signal_handler)
+signal.signal(signal.SIGTERM, signal_handler)
+
+###############################################################################
+
## simple structure object
class Struct(object):
pass