http://www.mediawiki.org/wiki/Special:Code/pywikipedia/11055
Revision: 11055 Author: xqt Date: 2013-02-08 14:43:56 +0000 (Fri, 08 Feb 2013) Log Message: ----------- use pywikibot.calledModuleName for the script
Modified Paths: -------------- branches/rewrite/pywikibot/comms/http.py
Modified: branches/rewrite/pywikibot/comms/http.py =================================================================== --- branches/rewrite/pywikibot/comms/http.py 2013-02-08 14:31:38 UTC (rev 11054) +++ branches/rewrite/pywikibot/comms/http.py 2013-02-08 14:43:56 UTC (rev 11055) @@ -40,14 +40,11 @@ # global variables
# the User-agent: header. The default is -# '<script>/<revision> Pywikipediabot/2.0', where '<script>' is the tail -# path component and file name of the currently executing script and -# revision is the SVN revision of Pywikipediabot. +# '<script>/<revision> Pywikipediabot/2.0', where '<script>' is the currently +# executing script and version is the SVN revision of Pywikipediabot. USER_AGENT_FORMAT = '{script}/r{version[rev]} Pywikipediabot/2.0' -useragent = (USER_AGENT_FORMAT.format( - script=('-'.join(pywikibot.version.get_executing_script())), - version=pywikibot.version.getversiondict() -)) +useragent = USER_AGENT_FORMAT.format(script=pywikibot.calledModuleName(), + version=pywikibot.version.getversiondict()) numthreads = 1 threads = []
pywikipedia-svn@lists.wikimedia.org