(self, conn, parts)
Find entries and send them to connection
Find entries and send them to connection
Find entries and send them to connection
def find(self, conn, parts):
        """Find entries and send them to connection"""

        title = parts.pop(0)
        msg = ''
        for i in self.db.entries:
            if title.decode().lower() in i.title.lower():
                msg += 'Title: '+i.title+'\n'
                if i.url is not None:
                    msg += 'URL: '+i.url+'\n'
                if i.username is not None:
                    msg += 'Username: '+i.username+'\n'
                if i.password is not None:
                    msg += 'Password: '+i.password+'\n'
                if i.creation is not None:
                    msg += 'Creation: '+i.creation.__str__()+'\n'
                if i.last_access is not None:
                    msg += 'Access: '+i.last_access.__str__()+'\n'
                if i.last_mod is not None:
                    msg += 'Modification: '+i.last_mod.__str__()+'\n'
                if i.expire is not None:
                    msg += 'Expiration: '+i.expire.__str__()+'\n'
                if i.comment is not None:
                    msg += 'Comment: '+i.comment+'\n'
                msg += '\n'
        sendmsg(conn, msg.encode())
def find ( self , conn , parts ) : title = parts . pop ( 0 ) msg = '' for i in self . db . entries : if title . decode ( ) . lower ( ) in i . title . lower ( ) : msg += 'Title: ' + i . title + '\n' if i . url is not None : msg += 'URL: ' + i . url + '\n' if i . username is not None : msg += 'Username: ' + i . username + '\n' if i . password is not None : msg += 'Password: ' + i . password + '\n' if i . creation is not None : msg += 'Creation: ' + i . creation . __str__ ( ) + '\n' if i . last_access is not None : msg += 'Access: ' + i . last_access . __str__ ( ) + '\n' if i . last_mod is not None : msg += 'Modification: ' + i . last_mod . __str__ ( ) + '\n' if i . expire is not None : msg += 'Expiration: ' + i . expire . __str__ ( ) + '\n' if i . comment is not None : msg += 'Comment: ' + i . comment + '\n' msg += '\n' sendmsg ( conn , msg . encode ( ) )