Bugs item #1733835, was opened at 2007-06-08 18:24 Message generated for change (Comment added) made by russblau You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=603138&aid=1733835...
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: None Group: None
Status: Closed Resolution: Fixed
Priority: 5 Private: No Submitted By: Nobody/Anonymous (nobody) Assigned to: Nobody/Anonymous (nobody) Summary: Bug in wikipedia.py and unsatisfying fix
Initial Comment: I am using snapshot-20070605.
I recognized a bug in wikipedia.py (line 1146, the last one in the code segment below):
# Submit the prepared information if self.site().hostname() in config.authenticate.keys(): predata.append(("Content-type","application/x-www-form-urlencoded")) predata.append(("User-agent", useragent)) data = self.site().urlEncode(predata) response = urllib2.urlopen(urllib2.Request('http://' + self.site().hostname() + address, data)) # I'm not sure what to check in this case, so I just assume things went ok. # Very naive, I agree. data = u'' else: try: response, data = self.site().postForm(address, predata, sysop) except httplib.BadStatusLine, line: raise PageNotSaved('Bad status line: %s' % line) if data != u'' and re.search(r'[^\n]', data) != None:
I added the condition behind the "and", because after I accepted changes for a given page "data" was unequal to ''. Instead "data" was a string of 4 newlines.
Hope It'll help you.
Best regards, Falk Steinhauer Wiki Aventurica
----------------------------------------------------------------------
Comment By: Russell Blau (russblau)
Date: 2008-02-28 18:03
Message: Logged In: YES user_id=855050 Originator: NO
Addressed in r5095.
----------------------------------------------------------------------
You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=603138&aid=1733835...
pywikipedia-l@lists.wikimedia.org