[issue9923] mailcap module may will not work on non-POSIX platforms if MAILCAPS env variable is set

Gregory Nofi report at bugs.python.org
Thu Sep 23 05:03:57 CEST 2010


New submission from Gregory Nofi <crackityjones2004-p at yahoo.com>:

mailcap.getcaps() has a call to mailcap.listmailcapfiles(), which returns a list of all mailcap files found on the system.

listmailcapfiles() first looks for the MAILCAPS environment variable. If it exists, it converts the string value into a list by splitting it on ":". This will not work on platforms that use other path separators, like Windows (";").

Attached are patches that use os.pathsep instead.

For more information about the MAILCAPS variable, see Appendix A in RFC 1524 (http://tools.ietf.org/html/rfc1524.html).

----------
assignee: ronaldoussoren
components: Library (Lib), Macintosh, Windows
files: mailcap_trunk.py
messages: 117163
nosy: gnofi, ronaldoussoren
priority: normal
severity: normal
status: open
title: mailcap module may will not work on non-POSIX platforms if MAILCAPS env variable is set
type: behavior
versions: Python 2.7, Python 3.1
Added file: http://bugs.python.org/file18969/mailcap_trunk.py

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue9923>
_______________________________________


More information about the Python-bugs-list mailing list