From: salimfadhley <svn...@pl...> - 2005-04-28 22:24:52
|
Author: salimfadhley Date: Thu Apr 28 18:17:15 2005 New Revision: 8283 Modified: Plodcasting/branches/sal12/PingTool.py Log: Slightly broken ping tool - values fail to persist, yet they are implemented in a persistentList... how could this be so? Modified: Plodcasting/branches/sal12/PingTool.py ============================================================================== --- Plodcasting/branches/sal12/PingTool.py (original) +++ Plodcasting/branches/sal12/PingTool.py Thu Apr 28 18:17:15 2005 @@ -28,9 +28,6 @@ """ defailtPingURLs=['http://rpc.pingomatic.com/', ] - pingURLs=PersistentList() - pingLog=PersistentList() - usePinger=False def icon(self): icon=getattr(self, 'podcast_icon.png', None) @@ -62,21 +59,17 @@ Sets the Pinger Urls """ lines=[line.strip() for line in text.split('\n') if len(line.strip()) > 0] + self.pingerURLs=PersistentList() - # Add any new line not in the ping list for line in lines: - if line not in self.pingURLs: - self.pingURLs.append(line) - - # Delete any lines removed from the ping list - for line in self.pingURLs: - if line not in lines: - del self.pingURLs[self.pingURLs.index(line)] + self.pingerURLs.append(line) def getPingerURLs(self): """ Return the Pinger URLs as a lump of text """ + if not hasattr(self,'pingURLs'): + self.pingURLs=PersistentList() return "\n".join(self.pingURLs) security.declareProtected(ManagePortal, 'manage_pinger') |