Commits

anatoly techtonik  committed 7a2ced9

UnicodeEncodeError workaround while printing issue title

  • Participants
  • Parent commits a04a459

Comments (0)

Files changed (1)

 for issuen in open_issues:
   issue = bpo.display('issue'+issuen, 'files', 'title')
   issue_files[issuen] = issue['files']
-  print('#%s: %s' % (issuen, issue['title']))
+  # encode title to get rid of
+  #   UnicodeEncodeError: 'charmap' codec can't encode character u'\u2019' in
+  #   position 65: character maps to <undefined>
+  print('#%s: %s' % (issuen, issue['title'].encode(errors='replace')))
   for filen in issue_files[issuen]:
     files_attached += 1
     print('  ' + filen, end='')
 print()
 for module, issues in module_issues.items():
   print('  %s: %d' % (module, len(issues)))
+print()
 print('Files affected by patches: %s' % len(python_files))
 
 # convert from a dict of (path, set(issues))