[New-bugs-announce] [issue3437] robotparser.py missing one line

mARK report at bugs.python.org
Thu Jul 24 17:50:26 CEST 2008


New submission from mARK <python.mbloore at xoxy.net>:

RobotFileParser.parse() contains the lines

                elif line[0] == "disallow":
                    if state != 0:
                        entry.rulelines.append(RuleLine(line[1], False))
                        state = 2
                elif line[0] == "allow":
                    if state != 0:
                        entry.rulelines.append(RuleLine(line[1], True))

with no 'state = 2' in the 'allow' part.
This causes different behaviour depending on whether the file ends with
'allow' or 'disallow', or an empty line.

Those lines were taken from revision 65118.  My Python 2.5 sources are
similar.  I have not checked others.

----------
components: Library (Lib)
messages: 70209
nosy: mbloore
severity: normal
status: open
title: robotparser.py missing one line
type: behavior
versions: Python 2.5, Python 3.0

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


More information about the New-bugs-announce mailing list