diff options
Diffstat (limited to 'pip/basecommand.py')
-rw-r--r-- | pip/basecommand.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/pip/basecommand.py b/pip/basecommand.py index 956dc9fa0..153ee52be 100644 --- a/pip/basecommand.py +++ b/pip/basecommand.py @@ -134,6 +134,10 @@ class Command(object): logger.fatal(str(e)) logger.info('Exception information:\n%s' % format_exc()) exit = 1 + except KeyboardInterrupt: + logger.fatal('Operation cancelled by user') + logger.info('Exception information:\n%s' % format_exc()) + exit = 1 except: logger.fatal('Exception:\n%s' % format_exc()) exit = 2 |