summaryrefslogtreecommitdiff
path: root/src/test_interrupts.py
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhosting.net>2017-09-28 12:19:30 +0200
committerJörg Frings-Fürst <debian@jff-webhosting.net>2017-09-28 12:19:30 +0200
commit7c6dd0eee627772485f8b06470ac84adc0f077f6 (patch)
tree69a28021c01029c221f78be31c4cb0335922ebfe /src/test_interrupts.py
parent6be31f5d140b81227911cabfc61d3802c76c1b61 (diff)
parentbaee03c569c91b745a1e025660b19a718db16e7d (diff)
Updated version 3.0.0 from 'upstream/3.0.0'
with Debian dir 147caafe8506326dfd094432b42ae32c21ed284e
Diffstat (limited to 'src/test_interrupts.py')
-rw-r--r--src/test_interrupts.py12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/test_interrupts.py b/src/test_interrupts.py
index e6a81f8..744677f 100644
--- a/src/test_interrupts.py
+++ b/src/test_interrupts.py
@@ -1,6 +1,6 @@
#!/usr/bin/env python
#
-# Copyright (c) 2001 - 2016 The SCons Foundation
+# Copyright (c) 2001 - 2017 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
@@ -21,7 +21,9 @@
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-__revision__ = "src/test_interrupts.py rel_2.5.1:3735:9dc6cee5c168 2016/11/03 14:02:02 bdbaddog"
+from __future__ import print_function
+
+__revision__ = "src/test_interrupts.py rel_3.0.0:4395:8972f6a2f699 2017/09/18 12:59:24 bdbaddog"
"""
Verify that the SCons source code contains only correct handling of
@@ -102,7 +104,7 @@ for f in files:
indent_list.append( (line_num, match.group('try_or_except') ) )
try_except_lines[match.group('indent')] = indent_list
uncaught_this_file = []
- for indent in try_except_lines.keys():
+ for indent in list(try_except_lines.keys()):
exc_keyboardint_seen = 0
exc_all_seen = 0
for (l,statement) in try_except_lines[indent] + [(-1,indent + 'try')]:
@@ -129,9 +131,9 @@ for f in files:
if expected_num != len(uncaught_this_file):
uncaughtKeyboardInterrupt = 1
msg = "%s: expected %d uncaught interrupts, got %d:"
- print msg % (f, expected_num, len(uncaught_this_file))
+ print(msg % (f, expected_num, len(uncaught_this_file)))
for line in uncaught_this_file:
- print " File %s:%d: Uncaught KeyboardInterrupt!" % (f,line)
+ print(" File %s:%d: Uncaught KeyboardInterrupt!" % (f,line))
test.fail_test(uncaughtKeyboardInterrupt)