'Returns emails when aString in subject or body'

def searchAStringInEmails(self, aString):

    (body, subject, emails) = ('', '', [])
    logging.debug('Searching    {1}    over    {0}    emails...'.format(self.getNbOfEmails(), aString))
    for anEmail in self.inbox.Items:
        outEmail = {'body': anEmail.Body, 'subject': anEmail.Subject}
        if (bool(re.search(aString, anEmail.Subject)) == True):
            emails.append(outEmail)
        elif (bool(re.search(aString, anEmail.Body)) == True):
            emails.append(outEmail)
    return emails
