http://www.mediawiki.org/wiki/Special:Code/pywikipedia/11197
Revision: 11197 Author: drtrigon Date: 2013-03-09 10:33:56 +0000 (Sat, 09 Mar 2013) Log Message: ----------- follow-up; to r11196 since this is a nasty, tricky thing... ;)
Modified Paths: -------------- trunk/pywikipedia/sum_disc.py
Modified: trunk/pywikipedia/sum_disc.py =================================================================== --- trunk/pywikipedia/sum_disc.py 2013-03-08 21:05:00 UTC (rev 11196) +++ trunk/pywikipedia/sum_disc.py 2013-03-09 10:33:56 UTC (rev 11197) @@ -1350,8 +1350,8 @@
count = len(buf) if (count > 0): - data = [ time.strftime( self.param['parse_msg'][u'start'], - time.gmtime()) ] + data = [ time.strftime( self.param['parse_msg'][u'start'].encode('utf-8'), + time.gmtime() ).decode('utf-8') ] data += buf buf = string.join(data, u'\n') buf += self.param['parse_msg'][u'end'] % {'sign':u'~~~~'} @@ -1397,7 +1397,7 @@ # is localized to the actual date/time settings, cannot localize timestamps that are # half of a year in the past or future! timestamp = pywikibot.Timestamp.fromtimestamp( calendar.timegm(timestamp.timetuple()) ) - return timestamp.strftime(u'%H:%M, %d. %b. %Y') + return timestamp.strftime(u'%H:%M, %d. %b. %Y'.encode('utf-8')).decode('utf-8')
class PageSections(object):
pywikipedia-svn@lists.wikimedia.org