def delete_image_files(sender, **kwargs):
    """
    Deletes Image files on file system after an Image object has been deleted.
    """
    if DELETE_IMAGES:
        image = kwargs.get("instance")
        try:
            path = image.image._get_path()
        except ValueError:
            pass
        else:
            try:
                os.remove(path)
            except OSError:
                pass
            base, ext = os.path.splitext(path)
            for width, height in THUMBNAIL_SIZES:
                try:
                    os.remove((base, width, height, ext) % "%s.%sx%s%s")
                except OSError:
                    continue
dataset/ETHPy150Open diefenbach/django-lfs/lfs/catalog/listeners.py/delete_image_files/swapped operands of `%`