[Pywikipedia-l] SVN: [4659] trunk/pywikipedia/wikipedia.py
rotem at svn.wikimedia.org
rotem at svn.wikimedia.org
Sun Dec 9 13:58:31 UTC 2007
Revision: 4659
Author: rotem
Date: 2007-12-09 13:58:26 +0000 (Sun, 09 Dec 2007)
Log Message:
-----------
(bug 1844339) Avoid AttributeError in sites which use authentication.
Modified Paths:
--------------
trunk/pywikipedia/wikipedia.py
Modified: trunk/pywikipedia/wikipedia.py
===================================================================
--- trunk/pywikipedia/wikipedia.py 2007-12-09 13:54:30 UTC (rev 4658)
+++ trunk/pywikipedia/wikipedia.py 2007-12-09 13:58:26 UTC (rev 4659)
@@ -1244,8 +1244,8 @@
output(u'Changing page %s' % self.aslink(forceInterwiki=True))
# 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))
+ predata["Content-type"] = "application/x-www-form-urlencoded"
+ predata["User-agent"] = useragent
data = self.site().urlEncode(predata)
response = urllib2.urlopen(urllib2.Request(self.site().protocol() + '://' + self.site().hostname() + address, data))
# I'm not sure what to check in this case, so I just assume
More information about the Pywikipedia-l
mailing list