Index: presubmit_support.py |
diff --git a/presubmit_support.py b/presubmit_support.py |
index b386524068c1ceddc44fc4e10edc4c596d6f577c..06fdee95c69a49346ccbf851d8c76ed7f335f384 100755 |
--- a/presubmit_support.py |
+++ b/presubmit_support.py |
@@ -1531,7 +1531,7 @@ def CallCommand(cmd_data): |
return cmd_data.info('%s (%4.2fs)' % (cmd_data.name, duration)) |
-def Main(argv): |
+def main(argv=None): |
parser = optparse.OptionParser(usage="%prog [options] <files...>", |
version="%prog " + str(__version__)) |
parser.add_option("-c", "--commit", action="store_true", default=False, |
@@ -1675,4 +1675,8 @@ def Main(argv): |
if __name__ == '__main__': |
fix_encoding.fix_encoding() |
- sys.exit(Main(None)) |
+ try: |
+ sys.exit(main()) |
+ except KeyboardInterrupt: |
+ print 'interrupted' |
+ sys.exit(1) |