lib/gettor/blacklist.py
def removeAll(self, olderThanDays=0):
        """Remove all blacklist entries that are older than 'olderThanDays'
           days.
        """
        for root, dirs, files in os.walk(self.blacklistDir):
            for file in files:
                rmfile = os.path.join(root, file)
                # Only remove files older than 'olderThanDays'
                if gettor.utils.fileIsOlderThan(rmfile, olderThanDays):
                    try:
                        os.remove(rmfile)
                    except OSError:
                        try:
                            os.rmdir(rmfile)
                        except:
                            logging.error("Could not remove %s." % rmfile)
                            return False
                    except:
                        logging.error("Could not remove %s." % rmfile)
                        return False
        return True
Remove all blacklist entries that are older than 'olderThanDays'
           days.
        
Remove all blacklist entries that are older than 'olderThanDays'
days.
Remove all blacklist entries that are older than ' olderThanDays ' days .
def removeAll(self, olderThanDays=0):
        for root, dirs, files in os.walk(self.blacklistDir):
            for file in files:
                rmfile = os.path.join(root, file)
                if gettor.utils.fileIsOlderThan(rmfile, olderThanDays):
                    try:
                        os.remove(rmfile)
                    except OSError:
                        try:
                            os.rmdir(rmfile)
                        except:
                            logging.error("Could not remove %s." % rmfile)
                            return False
                    except:
                        logging.error("Could not remove %s." % rmfile)
                        return False
        return True
def removeAll ( self , olderThanDays = 0 ) : for root , dirs , files in os . walk ( self . blacklistDir ) : for file in files : rmfile = os . path . join ( root , file ) if gettor . utils . fileIsOlderThan ( rmfile , olderThanDays ) : try : os . remove ( rmfile ) except OSError : try : os . rmdir ( rmfile ) except : logging . error ( "Could not remove %s." % rmfile ) return False except : logging . error ( "Could not remove %s." % rmfile ) return False return True
Remove all blacklist entries that are older than 'olderThanDays'
days.
Remove all blacklist entries that are older than ' olderThanDays ' days .
"""Remove all blacklist entries that are older than 'olderThanDays'
           days.
        """ # Only remove files older than 'olderThanDays'
self
olderThanDays