[issue14844] netrc does not handle accentuated characters

Raphaël Droz report at bugs.python.org
Tue May 22 11:14:14 CEST 2012


Raphaël Droz <raphael.droz+floss at gmail.com> added the comment:

$ python -c "import netrc; print netrc.netrc('/dev/stdin').authenticators('a')"<<<"machine a login b password c"
('b', None, 'c')

$ python -c "import netrc; print netrc.netrc('/dev/stdin').authenticators('a')"<<<"machine a login b password héhé"
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/usr/lib/python2.7/netrc.py", line 32, in __init__
    self._parse(file, fp)
  File "/usr/lib/python2.7/netrc.py", line 94, in _parse
    file, lexer.lineno)
netrc.NetrcParseError: bad follower token '\xc3' (/dev/stdin, line 1)

----------

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


More information about the Python-bugs-list mailing list