[Pywikipedia-l] [Pywikipedia-svn] SVN: [8588] trunk/pywikipedia/userlib.py
Dr. Trigon
dr.trigon at surfeu.ch
Wed Sep 22 18:27:00 UTC 2010
Works for me too! Thanks a lot for investigating this!
Am 22.09.2010 06:53, schrieb xqt at svn.wikimedia.org:
> Revision: 8588
> Author: xqt
> Date: 2010-09-22 04:53:21 +0000 (Wed, 22 Sep 2010)
>
> Log Message:
> -----------
> Fix for ascii encoding error for User.__str__() reported by DrTrigon
>
> Modified Paths:
> --------------
> trunk/pywikipedia/userlib.py
>
> Modified: trunk/pywikipedia/userlib.py
> ===================================================================
> --- trunk/pywikipedia/userlib.py 2010-09-21 16:47:03 UTC (rev 8587)
> +++ trunk/pywikipedia/userlib.py 2010-09-22 04:53:21 UTC (rev 8588)
> @@ -11,7 +11,7 @@
>
> import re
> import wikipedia as pywikibot
> -import query
> +import query, config
>
> class AutoblockUser(pywikibot.Error):
> """
> @@ -85,7 +85,9 @@
> return ip_regexp.match(self.username) is not None
>
> def __str__(self):
> - return u'%s:%s' % (self.site() , self.name())
> + return (u'%s:%s'
> + % (self.site(), self.name())).encode(config.console_encoding,
> + 'replace')
>
> def __repr__(self):
> return self.__str__()
>
>
>
> _______________________________________________
> Pywikipedia-svn mailing list
> Pywikipedia-svn at lists.wikimedia.org
> https://lists.wikimedia.org/mailman/listinfo/pywikipedia-svn
>
More information about the Pywikipedia-l
mailing list