diff options
| author | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2017-10-01 13:15:47 +0200 |
|---|---|---|
| committer | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2017-10-01 13:15:47 +0200 |
| commit | b0c36cefa1e0a4bf99681aade9e26ac6aa1ef903 (patch) | |
| tree | d63dc2036a39e716daf18e3c915fafb2fcba6674 /src/test_interrupts.py | |
| parent | 6be31f5d140b81227911cabfc61d3802c76c1b61 (diff) | |
| parent | a5d26f7b62414ed38e1815a49a864b15df2e9694 (diff) | |
Merge branch 'feature/upstream' into develop
Diffstat (limited to 'src/test_interrupts.py')
| -rw-r--r-- | src/test_interrupts.py | 12 |
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) |
