[Pywikipedia-l] [ pywikipediabot-Bugs-2539701 ] redirect.py Exception handing

SourceForge.net noreply at sourceforge.net
Thu Jan 29 22:54:12 UTC 2009


Bugs item #2539701, was opened at 2009-01-27 02:32
Message generated for change (Comment added) made by russblau
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=2539701&group_id=93107

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: other
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Nobody/Anonymous (nobody)
Assigned to: Nobody/Anonymous (nobody)
Summary: redirect.py Exception handing

Initial Comment:
Running through yi-wiki I've found that there should be an additional exception handling for the get_moved_pages_redirects - Method in redirect.py as follows:

  except wikipedia.NoPage:
      # original title must have been deleted after move
      continue

+ except wikipedia.IsNotRedirectPage:
+     continue



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

>Comment By: Russell Blau (russblau)
Date: 2009-01-29 17:54

Message:
r6313

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

Comment By: Russell Blau (russblau)
Date: 2009-01-29 17:54

Message:
Fixed in r...

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

Comment By: Nobody/Anonymous (nobody)
Date: 2009-01-29 00:41

Message:
There is an other Error which should be handled by exception in redirect.py
in  the fix_double_redirect - method.  If one page forms a redirect loop
and the self link directs to a nonexistent section, a SectionError would be
raised:
>>>Earhworm Jim PSP<<<
Links to [[Earthworm Jim PSP#Earthworm Jim PSP]].
Warning: Redirect target [[Earthworm Jim PSP#Earthworm Jim PSP]] forms a
redirect loop.
Traceback (most recent last):
...
File "C:\..\redirect.py in fix_double_redirects
content=targetPage.get(get_redirect=True)
File "C:\..\wikipedia.py in get self._contents = self._getEditpage(...)
File "C:\..\wikipedia.py in _getEditpage
raise SectionError # Page has no section by this name
wikipedia.SectionError

[de:User:Xqt]

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

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=2539701&group_id=93107



More information about the Pywikipedia-l mailing list