aboutsummaryrefslogtreecommitdiffstats
path: root/setuptools/py27compat.py
blob: 66aecc2a0a4aea013d41a136b1e0755de87232db (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
"""
Compatibility Support for Python 2.7 and earlier
"""

import sys


def get_all_headers(message, key):
    """
    Given an HTTPMessage, return all headers matching a given key.
    """
    return message.get_all(key)

if sys.version_info < (3,):
    def get_all_headers(message, key):
        return message.getheaders(key)