Message135196
It seems recent patch from Issue 10464 has introduced problems into
one line comment handling of netrc module.
Problem 1:
If there is a line starting with a comment sign the
following traceback is shown:
Traceback (most recent call last):
File "/usr/lib/python2.7/netrc.py", line 32, in __init__
self._parse(file, fp)
File "/usr/lib/python2.7/netrc.py", line 90, in _parse
file, lexer.lineno)
netrc.NetrcParseError: bad follower token '#' (./.netrc, line 3)
This can be fixed by modifying netrc.py like this:
71c71
< if (tt=='' or tt == 'machine' or
---
> if (tt=='' or tt == 'machine' or tt[0] == "#" or
Problem 2:
Now with the patch above it seems to work as long as there are
no comment lines like these:
a) with only pound sign:
#
b) with a pound sign followed by text without any space in between
#comment
If comment line like that is followed by netrc token that token
is consumed by fp.readline(). For example, if netrc file has
these contents:
<<<
machine host.domain.com login username password something
# comment1
machine host2.domain.com login username2 password something2
#comment2
machine host3.domain.com login username3 password something3
#
machine host4.domain.com login username4 password something4
>>>
netrc object will have entries only for host3 and host4. |
|
Date |
User |
Action |
Args |
2011-05-05 13:25:50 | rmstoi | set | recipients:
+ rmstoi |
2011-05-05 13:25:50 | rmstoi | set | messageid: <1304601950.35.0.920336944366.issue12009@psf.upfronthosting.co.za> |
2011-05-05 13:25:47 | rmstoi | link | issue12009 messages |
2011-05-05 13:25:47 | rmstoi | create | |
|