I didn't mean to commit that.  Thank you for so kindly pointing out the
mistake. 

> -----Original Message-----
> From: [email protected] 
> [mailto:[email protected]] On Behalf 
> Of Francesco Cosoleto
> Sent: Sunday, January 18, 2009 7:12 PM
> To: Pywikipedia discussion list
> Subject: Re: [Pywikipedia-l] SVN: [6266] trunk/pywikipedia
> 
> [email protected] wrote:
> > Log Message:
> > -----------
> > Add redirect templates to category redirect list
> 
> This is an example of not reviewed patch.
> 
> > Modified: trunk/pywikipedia/wikipedia.py 
> > ===================================================================
> > --- trunk/pywikipedia/wikipedia.py  2009-01-18 15:06:07 UTC 
> (rev 6265)
> > +++ trunk/pywikipedia/wikipedia.py  2009-01-18 22:23:28 UTC 
> (rev 6266)
> > @@ -3415,7 +3415,13 @@
> >                          break
> >                      groupID = groupMatch.group('name') or 
> int(groupMatch.group('number'))
> >                      replacement = 
> replacement[:groupMatch.start()] + match.group(groupID) + 
> replacement[groupMatch.end():]
> > -            text = text[:match.start()] + replacement + 
> text[match.end():]
> > +            try:
> > +                text = text[:match.start()] + replacement 
> + text[match.end():]
> > +            except:
> > +                print text
> > +                print match.start(), match.end()
> > +                print replacement
> > +                raise
> >  
> 
> Looks as nonsense. Does it be consistency with the rest of 
> the change? 
> Can this block code raise an exception too?
> 
> > Modified: trunk/pywikipedia/xmlreader.py 
> > ===================================================================
> > --- trunk/pywikipedia/xmlreader.py  2009-01-18 15:06:07 UTC 
> (rev 6265)
> > +++ trunk/pywikipedia/xmlreader.py  2009-01-18 22:23:28 UTC 
> (rev 6266)
> > @@ -160,8 +160,8 @@
> >              # Remove trailing newlines and spaces
> >              while text and text[-1] in '\n ':
> >                  text = text[:-1]
> > -            # Replace newline by cr/nl
> > -            text = u'\r\n'.join(text.split('\n'))
> > +##            # Replace newline by cr/nl
> > +##            text = u'\r\n'.join(text.split('\n'))
> >              # Decode the timestamp
> >              timestamp = (self.timestamp[0:4]+
> >                           self.timestamp[5:7]+
> 
> Maybe have you fixed here a very old problem that I have 
> reported in mailing-list about unnecessary CR chars in 
> xmlreader module 
> (https://lists.wikimedia.org/mailman/htdig/pywikipedia-l/2007-
> October/000861.html)? 
>    So funny as it is fixed now, but this isn't related to 
> "Add redirect templates to category redirect list".
> 
> --
> Francesco Cosoleto
> 
> _______________________________________________
> Pywikipedia-l mailing list
> [email protected]
> https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
> 
> No virus found in this incoming message.
> Checked by AVG - http://www.avg.com
> Version: 8.0.176 / Virus Database: 270.10.9/1900 - Release 
> Date: 1/18/2009 12:11 PM
> 


_______________________________________________
Pywikipedia-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l

Reply via email to