summaryrefslogtreecommitdiffstats
path: root/src/test_interrupts.py
diff options
context:
space:
mode:
authorSteven Knight <knight@baldmt.com>2008-10-05 13:42:01 (GMT)
committerSteven Knight <knight@baldmt.com>2008-10-05 13:42:01 (GMT)
commit7719d579dddb84c57033c1fdf3a02268abba2204 (patch)
tree37673009efc7e338128252b3b249bb18fe40652c /src/test_interrupts.py
parent091232eb5b0dde383133d38aee899fa4cfa9555c (diff)
downloadSCons-7719d579dddb84c57033c1fdf3a02268abba2204.zip
SCons-7719d579dddb84c57033c1fdf3a02268abba2204.tar.gz
SCons-7719d579dddb84c57033c1fdf3a02268abba2204.tar.bz2
Fix a block in Script/Main.py that could swallow KeyboardInterrupt
exceptions. Fix the script that analyzes our try:-except: block so it recognizes that "except Exception, e:" is equivalent to "except:".
Diffstat (limited to 'src/test_interrupts.py')
-rw-r--r--src/test_interrupts.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/test_interrupts.py b/src/test_interrupts.py
index 6fb82b4..eee1f0c 100644
--- a/src/test_interrupts.py
+++ b/src/test_interrupts.py
@@ -83,7 +83,7 @@ else:
tryexc_pat = re.compile(
r'^(?P<try_or_except>(?P<indent> *)(try|except)( [^\n]*)?:.*)',re.MULTILINE)
keyboardint_pat = re.compile(r' *except +([^,],)*KeyboardInterrupt([ ,][^\n]*)?:[^\n]*')
-exceptall_pat = re.compile(r' *except *:[^\n]*')
+exceptall_pat = re.compile(r' *except(?: *| +Exception *, *[^: ]+):[^\n]*')
uncaughtKeyboardInterrupt = 0
for f in files: