Revision: 4201
Author: misza13
Date: 2007-09-05 17:18:41 +0000 (Wed, 05 Sep 2007)
Log Message:
-----------
Fix configuration updating code.
Modified Paths:
--------------
trunk/pywikipedia/archivebot.py
Modified: trunk/pywikipedia/archivebot.py
===================================================================
--- trunk/pywikipedia/archivebot.py 2007-09-05 16:48:32 UTC (rev 4200)
+++ trunk/pywikipedia/archivebot.py 2007-09-05 17:18:41 UTC (rev 4201)
@@ -386,7 +386,8 @@
self.archives[a].update(comment)
#Save the page itself
- self.Page.header =
re.sub('{{'+self.tpl+'\n.*?\n}}',self.attr2text(),self.Page.header,re.DOTALL)
+ rx = re.compile('{{'+self.tpl+'\n.*?\n}}',re.DOTALL)
+ self.Page.header = rx.sub(self.attr2text(),self.Page.header)
self.commentParams['count'] = self.archivedThreads
self.commentParams['archives'] = ',
'.join(['[['+a.title+']]' for a in self.archives.values()])
if not self.commentParams['archives']:
Show replies by date