Revision: 5806 Author: nicdumz Date: 2008-08-18 01:54:03 +0000 (Mon, 18 Aug 2008)
Log Message: ----------- quickfix for previous commit -_-'
Modified Paths: -------------- trunk/pywikipedia/wikipedia.py
Modified: trunk/pywikipedia/wikipedia.py =================================================================== --- trunk/pywikipedia/wikipedia.py 2008-08-18 01:48:25 UTC (rev 5805) +++ trunk/pywikipedia/wikipedia.py 2008-08-18 01:54:03 UTC (rev 5806) @@ -1287,7 +1287,7 @@ """Encode an ascii string/Unicode string to the site's encoding""" try: if isinstance(arg, str): - arg.decode() # fails with UnicodeDecodeError if non-ascii + return arg.decode() # fails with UnicodeDecodeError if non-ascii except UnicodeDecodeError: raise PageNotSaved("An ascii string or unicode %s is expected" % msgForError) try: @@ -1308,8 +1308,8 @@ address = self.site().put_address(self.urlname()) predata = { 'wpSave': '1', - 'wpSummary': _encodeArg(comment, 'edit summary'), - 'wpTextbox1': _encodeArg(text, 'wikitext'), + 'wpSummary': self._encodeArg(comment, 'edit summary'), + 'wpTextbox1': self._encodeArg(text, 'wikitext'), } if captchaId: predata["wpCaptchaId"] = captchaId
pywikipedia-l@lists.wikimedia.org