def get_header(self, msg, *headers):
    values = []
    for header in headers:
        try:
            for value in ensure_list(msg.get_all(header)):
                values.append(value)
        except (TypeError, IndexError, AttributeError, ValueError) as exc:
            log.warning('Failed to parse [%s]: %s', header, exc)
    return values
def get_header(self, msg, *headers):
    values = []
    for header in headers:
        try:
            for value in ensure_list(msg.get_all(header)):
                values.append(value)
        except (TypeError, IndexError, AttributeError, ValueError) as exc:
            log.warning('Failed to parse [%s]: %s', header, exc)
    return values