def get_dates(self, msg, *headers):
    dates = []
    for value in self.get_header(msg, *headers):
        try:
            dates.append(parsedate_to_datetime(value))
        except Exception:
            log.warning('Failed to parse: %s', value)
    return dates
def get_dates(self, msg, *headers):
    dates = []
    for value in self.get_header(msg, *headers):
        try:
            dates.append(parsedate_to_datetime(value))
        except Exception:
            log.warning('Failed to parse: %s', value)
    return dates