lib/gettor/blacklist.py
def createListEntry(self, address, blacklistName="general"):
        """Create a black- or whitelist entry
        """
        if address is None:
           logging.error("Bad args in createListEntry()")
           return False
        if self.lookupListEntry(address, blacklistName) == False:
            hashString = self.getHash(address)
            entry = os.path.join(self.blacklistDir, blacklistName, hashString)
            try:
                fd = open(entry, 'w')
                fd.close
                return True
            except:
                logging.error("Creating list entry %s failed." % entry)
                return False
        else:
            # List entry already exists
            return False
Create a black- or whitelist entry
        
Create a black- or whitelist entry
Create a black - or whitelist entry
def createListEntry(self, address, blacklistName="general"):
        if address is None:
           logging.error("Bad args in createListEntry()")
           return False
        if self.lookupListEntry(address, blacklistName) == False:
            hashString = self.getHash(address)
            entry = os.path.join(self.blacklistDir, blacklistName, hashString)
            try:
                fd = open(entry, 'w')
                fd.close
                return True
            except:
                logging.error("Creating list entry %s failed." % entry)
                return False
        else:
            return False
def createListEntry ( self , address , blacklistName = "general" ) : if address is None : logging . error ( "Bad args in createListEntry()" ) return False if self . lookupListEntry ( address , blacklistName ) == False : hashString = self . getHash ( address ) entry = os . path . join ( self . blacklistDir , blacklistName , hashString ) try : fd = open ( entry , 'w' ) fd . close return True except : logging . error ( "Creating list entry %s failed." % entry ) return False else : return False
Create a black- or whitelist entry
Create a black - or whitelist entry
"""Create a black- or whitelist entry
        """ # List entry already exists
self
address
blacklistName