Ned Deily added the comment:

I can reproduce the failure by arbitrarily adding a non-ascii character to one 
of the mailcap files searched for by the mailcap module 
(https://docs.python.org/3/library/mailcap.html#mailcap.getcaps), like 
$HOME/.mailcap, and by setting the process to an ascii-only locale (export 
LANG=C).  While this might be a somewhat unusual combination in practice, 
mailcap should be able to handle it.

By the way, this is a Python 3 problem since test_mailcap does not exist in 
Python 2.  2.7.6 might be the version of the system-supplied Python, but you 
appeared to be running with a Python you built.  Try

  ./python -V

to show the version of the Python you are using.

----------
components: +Library (Lib) -Tests
nosy: +ned.deily
stage:  -> needs patch
title: test_mailcap fails -> test_mailcap fails if a mailcap file contains a 
non-decodable character
type: crash -> 
versions: +Python 3.4, Python 3.5 -Python 2.7

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue24152>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to