[Patches] [ python-Patches-499513 ] robotparser.py fails on some URLs

noreply@sourceforge.net noreply@sourceforge.net
Mon, 18 Mar 2002 05:58:09 -0800


Patches item #499513, was opened at 2002-01-04 13:21
You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=305470&aid=499513&group_id=5470

Category: Library (Lib)
Group: None
Status: Closed
Resolution: Accepted
Priority: 5
Submitted By: Bastian Kleineidam (calvin)
>Assigned to: Martin v. Löwis (loewis)
Summary: robotparser.py fails on some URLs

Initial Comment:
I am using Python 2.1.1.

The URL http://www.chaosreigns.com/robots.txt results
in an empty RobotParser object.
Reason is that the file object returned from the
URLOpener does not have a readlines() attribute.

I patched the robotparser.py to use readline() instead
of readlines().
Furthermore I removed the unnecessary redirection limit
code which is already in FancyURLopener.


Greetings, Bastian


----------------------------------------------------------------------

Comment By: Martin v. Löwis (loewis)
Date: 2002-03-18 05:43

Message:
Logged In: YES 
user_id=21627

Thanks for the patch. Committed as robotparser.py 1.12.

----------------------------------------------------------------------

Comment By: Bastian Kleineidam (calvin)
Date: 2002-01-04 14:02

Message:
Logged In: YES 
user_id=9205

Updated patch with copyright

----------------------------------------------------------------------

Comment By: Guido van Rossum (gvanrossum)
Date: 2002-01-04 13:49

Message:
Logged In: YES 
user_id=6380

I'll gladly apply your patch.

Would you mind to also supply a patch for the copyright
statement?
It says "Python 2.0 open source license" but that's no
longer the current license. How about the PSF license
agreement for Python 2.2?


----------------------------------------------------------------------

You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=305470&aid=499513&group_id=5470