def parse_header(header):
    headers = {}
    for kvpair in filter(lambda p: p,
                         map(lambda p: p.strip(),
                             header.split(';'))):
        try:
            key, value = kvpair.split("=", 1)
        except __HOLE__:
            continue
        headers[key.strip()] = value.strip('"')

    return headers
dataset/ETHPy150Open mvantellingen/localshop/localshop/apps/packages/utils.py/parse_header