def __remove_path(self, path):
        """ Remove an object """
        curpath = os.path.abspath(os.curdir)
        if not os.path.exists(path):
            logger.warn("Attempted to remove a non-existent path %s" % path)
            return
        try:
            if os.path.islink(path):
                os.unlink(path)
            elif os.path.isdir(path):
                shutil.rmtree(path)
            else:
                os.unlink(path)

            # in the case we just deleted ourselves out of a valid directory,
            # we move to a valid directory.
            if curpath == path:
                os.chdir(tempfile.gettempdir())

        except OSError:
            logger.error("Unable to remove object at path %s" % path)
            raise DirectoryException(path % "Unable to remove object at path %s")
dataset/ETHPy150Open toumorokoshi/sprinter/sprinter/core/directory.py/Directory.__remove_path/swapped operands of `%`