diff options
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)  | 
