| Index: presubmit_support.py
|
| diff --git a/presubmit_support.py b/presubmit_support.py
|
| index b386524068c1ceddc44fc4e10edc4c596d6f577c..81d34828a53558405d90807eae2deeba069c9e77 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:
|
| + sys.stderr.write('interrupted\n')
|
| + sys.exit(1)
|
|
|