Update validate_failures.py to Python 3
diff --git a/contrib/testsuite-management/validate_failures.py b/contrib/testsuite-management/validate_failures.py
index 2779050..8296e7d 100755
--- a/contrib/testsuite-management/validate_failures.py
+++ b/contrib/testsuite-management/validate_failures.py
@@ -1,12 +1,8 @@
-#!/usr/bin/python
+#!/usr/bin/python3
 
 # Script to compare testsuite failures against a list of known-to-fail
 # tests.
 #
-# NOTE: This script is used in installations that are running Python 2.4.
-#       Please stick to syntax features available in 2.4 and earlier
-#       versions.
-
 # Contributed by Diego Novillo <dnovillo@google.com>
 #
 # Copyright (C) 2011-2013 Free Software Foundation, Inc.
@@ -82,7 +78,7 @@
 _OPTIONS = None
 
 def Error(msg):
-  print >>sys.stderr, 'error: %s' % msg
+  print('error: %s' % msg, file=sys.stderr)
   sys.exit(1)
 
 
@@ -126,7 +122,7 @@
          self.description) = re.match(r'([A-Z]+):\s*(\S+)\s*(.*)',
                                       summary_line).groups()
       except:
-        print 'Failed to parse summary line: "%s"' % summary_line
+        print('Failed to parse summary line: "%s"' % summary_line)
         raise
       self.ordinal = ordinal
     except ValueError:
@@ -246,7 +242,7 @@
 def ParseManifestWorker(result_set, manifest_path):
   """Read manifest_path, adding the contents to result_set."""
   if _OPTIONS.verbosity >= 1:
-    print 'Parsing manifest file %s.' % manifest_path
+    print('Parsing manifest file %s.' % manifest_path)
   manifest_file = open(manifest_path)
   for line in manifest_file:
     line = line.strip()
@@ -287,7 +283,7 @@
         # Tests that have expired are not added to the set of expected
         # results. If they are still present in the set of actual results,
         # they will cause an error to be reported.
-        print 'WARNING: Expected failure "%s" has expired.' % line.strip()
+        print('WARNING: Expected failure "%s" has expired.' % line.strip())
         continue
       result_set.add(result)
   sum_file.close()
@@ -324,7 +320,7 @@
   """Collect all the test results from the given .sum files."""
   build_results = set()
   for sum_fname in sum_files:
-    print '\t%s' % sum_fname
+    print('\t%s' % sum_fname)
     build_results |= ParseSummary(sum_fname)
   return build_results
 
@@ -387,23 +383,23 @@
       return None, None
   srcdir = GetMakefileValue('%s/Makefile' % _OPTIONS.build_dir, 'srcdir =')
   target = GetMakefileValue('%s/Makefile' % _OPTIONS.build_dir, 'target_alias=')
-  print 'Source directory: %s' % srcdir
-  print 'Build target:     %s' % target
+  print('Source directory: %s' % srcdir)
+  print('Build target:     %s' % target)
   return srcdir, target
 
 
 def PrintSummary(msg, summary):
-  print '\n\n%s' % msg
+  print('\n\n%s' % msg)
   for result in sorted(summary):
-    print result
+    print(result)
 
 
 def GetSumFiles(results, build_dir):
   if not results:
-    print 'Getting actual results from build directory %s' % build_dir
+    print('Getting actual results from build directory %s' % build_dir)
     sum_files = CollectSumFiles(build_dir)
   else:
-    print 'Getting actual results from user-provided results'
+    print('Getting actual results from user-provided results')
     sum_files = results.split()
   return sum_files
 
@@ -425,7 +421,7 @@
                  expected_vs_actual)
 
   if tests_ok:
-    print '\nSUCCESS: No unexpected failures.'
+    print('\nSUCCESS: No unexpected failures.')
 
   return tests_ok
 
@@ -433,7 +429,7 @@
 def CheckExpectedResults():
   srcdir, target = GetBuildData()
   manifest_path = GetManifestPath(srcdir, target, True)
-  print 'Manifest:         %s' % manifest_path
+  print('Manifest:         %s' % manifest_path)
   manifest = GetManifest(manifest_path)
   sum_files = GetSumFiles(_OPTIONS.results, _OPTIONS.build_dir)
   actual = GetResults(sum_files)
@@ -448,7 +444,7 @@
 def ProduceManifest():
   (srcdir, target) = GetBuildData()
   manifest_path = GetManifestPath(srcdir, target, False)
-  print 'Manifest:         %s' % manifest_path
+  print('Manifest:         %s' % manifest_path)
   if os.path.exists(manifest_path) and not _OPTIONS.force:
     Error('Manifest file %s already exists.\nUse --force to overwrite.' %
           manifest_path)
@@ -457,7 +453,7 @@
   actual = GetResults(sum_files)
   manifest_file = open(manifest_path, 'w')
   for result in sorted(actual):
-    print result
+    print(result)
     manifest_file.write('%s\n' % result)
   manifest_file.close()