Commits

Georg Brandl committed 424a09d

Fix #767: safely encode SphinxErrors when printing to sys.stderr.

  • Participants
  • Parent commits 982de65

Comments (0)

Files changed (1)

sphinx/cmdline.py

                 print >>error, err.args[0].encode('ascii', 'backslashreplace')
             elif isinstance(err, SphinxError):
                 print >>error, red('%s:' % err.category)
-                print >>error, err
+                print >>error, unicode(err).encode('ascii', 'backslashreplace')
             else:
                 print >>error, red('Exception occurred:')
                 print >>error, format_exception_cut_frames().rstrip()