[Pywikipedia-l] SVN: [5753] trunk/pywikipedia/wikipedia.py

nicdumz at svn.wikimedia.org nicdumz at svn.wikimedia.org
Thu Jul 24 17:38:01 UTC 2008


Revision: 5753
Author:   nicdumz
Date:     2008-07-24 17:38:01 +0000 (Thu, 24 Jul 2008)

Log Message:
-----------
Wait for the end of the thread putting the pages before deleting Site objects. This should fix [ pywikipediabot-Bugs-2026525 ] diskcache fails with an IOError[22] in welcome.py

Modified Paths:
--------------
    trunk/pywikipedia/wikipedia.py

Modified: trunk/pywikipedia/wikipedia.py
===================================================================
--- trunk/pywikipedia/wikipedia.py	2008-07-24 16:51:51 UTC (rev 5752)
+++ trunk/pywikipedia/wikipedia.py	2008-07-24 17:38:01 UTC (rev 5753)
@@ -6397,6 +6397,8 @@
         for site in _sites.itervalues():
             if site._mediawiki_messages:
                 try:
+                    while(_putthread.isAlive()):
+                        time.sleep(1)
                     site._mediawiki_messages.delete()
                 except OSError:
                     # stopme has been called several times...





More information about the Pywikipedia-l mailing list