def get_filename(disposition):
    """Parse Content-Disposition header to pull out the filename bit.

    See: http://tools.ietf.org/html/rfc2616#section-19.5.1

    """
    if disposition:
        params = [param.strip() for param in disposition.split(';')[1:]]
        for param in params:
            if param in '=':
                name, value = param.split('=', 1)
                if name == 'filename':
                    return value.strip('"')
dataset/ETHPy150Open jasonkeene/python-ubersmith/ubersmith/utils.py/get_filename/swapped operands of `in`