Commits

Ezio Melotti committed 3dd4987

Use print() instead of stdout.write().

  • Participants
  • Parent commits 05980c6

Comments (0)

Files changed (1)

 
 """
 
+from __future__ import print_function
 from datetime import datetime
-from sys import version_info, stdout
+from sys import version_info
 
 START = datetime.now()
 
   issue_files[issue] = bpo.display('issue'+issue, 'files')['files']
   for filen in issue_files[issue]:
     files_attached += 1
-    stdout.write('  ' + filen)
+    print('  ' + filen, end='')
     # get file
     path, cached = fileget(filen)
     if cached:
-      stdout.write(' (cached)')
+      print(' (cached)', end='')
     # check if it is a patch
     patchset = patch.fromfile(path)
     if patchset:
         module = (stdlib.getmodname(entry.source) or
                   stdlib.getmodname(entry.target))
         if module:
-          stdout.write(' (module: %s)' % module)
+          print(' (module: %s)' % module, end='')
           if module not in module_issues:
             module_issues[module] = []
           if issue not in module_issues[module]:
           # [ ] handle unknown path - ask to add to unknown paths cache
           pass
     else:
-      stdout.write(' (not a patch)')
-    stdout.write('\n')
+      print(' (not a patch)', end='')
+    print()
 
 
 print('')