[Patches] [ python-Patches-514628 ] bug in pydoc on python 2.2 release
noreply@sourceforge.net
noreply@sourceforge.net
Mon, 18 Mar 2002 00:48:00 -0800
Patches item #514628, was opened at 2002-02-08 03:09
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=305470&aid=514628&group_id=5470
Category: Library (Lib)
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Raj Kunjithapadam (mmaster25)
Assigned to: Tim Peters (tim_one)
Summary: bug in pydoc on python 2.2 release
Initial Comment:
pydoc has a bug when trying to generate html doc
more importantly it has bug in the method
writedoc()
attached is my fix.
Here is the diff between my fix and the regular dist
1338c1338
< def writedoc(thing, forceload=0):
---
> def writedoc(key, forceload=0):
1340,1346c1340,1343
< object = thing
< if type(thing) is type(''):
< try:
< object = locate(thing, forceload)
< except ErrorDuringImport, value:
< print value
< return
---
> try:
> object = locate(key, forceload)
> except ErrorDuringImport, value:
> print value
1351c1348
< file = open(thing.__name__ + '.html', 'w')
---
> file = open(key + '.html', 'w')
1354c1351
< print 'wrote', thing.__name__ + '.html'
---
> print 'wrote', key + '.html'
1356c1353
< print 'no Python documentation found for
%s' % repr(thing)
---
> print 'no Python documentation found for
%s' % repr(key)
----------------------------------------------------------------------
>Comment By: Martin v. Löwis (loewis)
Date: 2002-03-18 09:48
Message:
Logged In: YES
user_id=21627
Can you please provide an example that demonstrates the problem?
Also, can you please regenerate your changes as context (-c)
or unified (-u) diffs, and attach those to this report (do
*not* paste them into the comment field)? In their current,
the patch is pretty useless: SF messed up the indentation,
and it is an old-style patch, and pydoc.py is already at 1.58.
----------------------------------------------------------------------
Comment By: Guido van Rossum (gvanrossum)
Date: 2002-03-01 23:45
Message:
Logged In: YES
user_id=6380
assigned to Tim; this may be Ping's terrain but Ping is
typically not responsive.
----------------------------------------------------------------------
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=305470&aid=514628&group_id=5470