mdt: Stop the stupid python tracebacks on SIGINT
We really don't need to know. :D
Change-Id: If82f67e8f8791df6c1c6145e4fc862f54e243823
diff --git a/mdt/mdt.py b/mdt/mdt.py
index b02c3fd..43753ce 100755
--- a/mdt/mdt.py
+++ b/mdt/mdt.py
@@ -29,14 +29,18 @@
def main():
- if len(sys.argv) <= 1:
- command = 'help'
- else:
- command = sys.argv[1].lower()
+ try:
+ if len(sys.argv) <= 1:
+ command = 'help'
+ else:
+ command = sys.argv[1].lower()
- command = COMMANDS.get(command)
- if command != None:
- exit(command.run(sys.argv[1:]))
+ command = COMMANDS.get(command)
+ if command != None:
+ exit(command.run(sys.argv[1:]))
+ except KeyboardInterrupt:
+ print()
+ exit(1)
if __name__ == '__main__':