Handle KeyboardInterrupt in buck.py. Summary: Terminating a buck build with CTRL-C sometimes results in a Python Traceback being shown on the terminal. Fix this by catching KeyboardInterrupt in the main() method. Don't do anything with the caught exception; just pass. Test Plan: Build something. Terminate it with CTRL-C. Don't see a TraceBack.
diff --git a/src/com/facebook/buck/parser/buck.py b/src/com/facebook/buck/parser/buck.py index 44e9f3c..46b8719 100644 --- a/src/com/facebook/buck/parser/buck.py +++ b/src/com/facebook/buck/parser/buck.py
@@ -866,4 +866,7 @@ if __name__ == '__main__': - main() + try: + main() + except KeyboardInterrupt: + print >> sys.stderr, "Killed by User"