From 3e5987039015ff7cd8896b0b2cbf11a65dd92356 Mon Sep 17 00:00:00 2001 From: stevenknight Date: Thu, 30 Apr 2009 15:27:04 +0000 Subject: [PATCH] Avoid swallowing KeyboardInterrupt in new try:-except: blocks. git-svn-id: http://scons.tigris.org/svn/scons/trunk@4165 fdb21ef1-2011-0410-befe-b5e4ea1792b1 --- src/engine/SCons/Script/Main.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/engine/SCons/Script/Main.py b/src/engine/SCons/Script/Main.py index a8ec8f6e..44ca8772 100644 --- a/src/engine/SCons/Script/Main.py +++ b/src/engine/SCons/Script/Main.py @@ -718,10 +718,14 @@ def _load_site_scons_dir(topdir, site_dir_name=None): try: # This is the magic. exec fp in m.__dict__ + except KeyboardInterrupt: + raise except Exception, e: fmt = '*** Error loading site_init file %s:\n' sys.stderr.write(fmt % repr(site_init_file)) raise + except KeyboardInterrupt: + raise except ImportError, e: fmt = '*** cannot import site init file %s:\n' sys.stderr.write(fmt % repr(site_init_file)) -- 2.26.2