Hello.
Attached you can find a patch file which updates welcome.py so it would
contain the required details for a bot to work with Persian (fa) Wikipedia.
I opened a request on the bug tracker (on SourceForge) today in this regard
as well, but Merlijn told me to create a patch for it. The current patch is
more complete that what I sent there. With this patch, that bug is obsolete,
so treat it is you should.
Best regards,
Huji
Revision: 3908
Author: wikipedian
Date: 2007-07-27 02:00:20 +0000 (Fri, 27 Jul 2007)
Log Message:
-----------
Save the history just before terminating. This makes it less probable
that a link checking thread finishes after the history has been stored
to disk.
Modified Paths:
--------------
trunk/pywikipedia/weblinkchecker.py
Modified: trunk/pywikipedia/weblinkchecker.py
===================================================================
--- trunk/pywikipedia/weblinkchecker.py 2007-07-27 01:52:12 UTC (rev 3907)
+++ trunk/pywikipedia/weblinkchecker.py 2007-07-27 02:00:20 UTC (rev 3908)
@@ -637,8 +637,6 @@
if countLinkCheckThreads() > 0:
wikipedia.output(u'Remaining %i threads will be killed.' % countLinkCheckThreads())
# Threads will die automatically because they are daemonic.
- wikipedia.output(u'Saving history...')
- bot.history.save()
if bot.history.reportThread:
bot.history.reportThread.shutdown()
# wait until the report thread is shut down; the user can interrupt
@@ -649,6 +647,8 @@
except KeyboardInterrupt:
wikipedia.output(u'Report thread interrupted.')
bot.history.reportThread.kill()
+ wikipedia.output(u'Saving history...')
+ bot.history.save()
else:
wikipedia.showHelp()
Revision: 3907
Author: wikipedian
Date: 2007-07-27 01:52:12 +0000 (Fri, 27 Jul 2007)
Log Message:
-----------
minor bugfix, with some luck this resolves bug [ 1747996 ]
"weblinkchecker - AttributeError"
Modified Paths:
--------------
trunk/pywikipedia/weblinkchecker.py
Modified: trunk/pywikipedia/weblinkchecker.py
===================================================================
--- trunk/pywikipedia/weblinkchecker.py 2007-07-26 22:52:45 UTC (rev 3906)
+++ trunk/pywikipedia/weblinkchecker.py 2007-07-27 01:52:12 UTC (rev 3907)
@@ -1,4 +1,4 @@
-# -*- coding: utf-8 -*-
+# -*- coding: utf-8 -*-
"""
This bot is used for checking external links found at the wiki. It checks
several pages at once, with a limit set by the config variable
@@ -474,7 +474,7 @@
Saves the .dat file to disk.
"""
datfile = open(self.datfilename, 'w')
- self.historyDict = pickle.dump(self.historyDict, datfile)
+ pickle.dump(self.historyDict, datfile)
datfile.close()
class DeadLinkReportThread(threading.Thread):