def get_exif_orientation(image):
    # Extract the orientation tag
    try:
        exif_data = image._getexif()  # should be careful with that _method
    except AttributeError:
        # No Exif data, return None
        return None
    if exif_data is not None and exif_data in EXIF_TAGS['Orientation']:
        orientation = exif_data[EXIF_TAGS['Orientation']]
        return orientation
    # No Exif orientation tag, return None
    return None
dataset/ETHPy150Open littleweaver/django-daguerre/daguerre/utils.py/get_exif_orientation/swapped operands of `in`