Merged revisions 78991-78992,78994 via svnmerge from

svn+ssh://pythondev@svn.python.org/python/branches/py3k

................
  r78991 | martin.v.loewis | 2010-03-16 12:03:13 +0100 (Di, 16 Mär 2010) | 9 lines

  Merged revisions 78976 via svnmerge from
  svn+ssh://pythondev@svn.python.org/python/trunk

  ........
    r78976 | martin.v.loewis | 2010-03-15 14:00:17 +0100 (Mo, 15 Mär 2010) | 1 line

    Issue #6716: Quote -x arguments of compileall in MSI installer.
  ........
................
  r78992 | martin.v.loewis | 2010-03-16 14:19:21 +0100 (Di, 16 Mär 2010) | 2 lines

  Issue #6716/2: Backslash-replace error output in compilall.
................
  r78994 | martin.v.loewis | 2010-03-16 17:19:47 +0100 (Di, 16 Mär 2010) | 1 line

  Issue #6716/3: Exclude 2to3 tests from compileall.
................
This commit is contained in:
Martin v. Löwis 2010-03-21 22:02:42 +00:00
parent 1d6af707cf
commit e96ac3a33a
4 changed files with 38 additions and 3 deletions

View file

@ -77,7 +77,10 @@ def compile_dir(dir, maxlevels=10, ddir=None,
print('*** Error compiling', fullname, '...')
else:
print('*** ', end='')
print(err.msg)
# escape non-printable characters in msg
msg = err.msg.encode(sys.stdout.encoding, 'backslashreplace')
msg = msg.decode(sys.stdout.encoding)
print(msg)
success = 0
except (SyntaxError, UnicodeError, IOError) as e:
if quiet: