def undo(self, actions=None):
        if actions is None:
            try:
                actions = self.history.pop()
            except __HOLE__:
                log.error("History list is empty.")
                return

        for i in actions:
            log.debug("{} -> {}.".format(i[1], i[0]))
            if self.simulate:
                continue
            try:
                os.rename(i[1], i[0])
            except Exception as e:
                log.error("Rename Error: {} -> {} ({}).".format(i[1], i[0], e))
                if self.autostop:
                    break

        log.info("Undo complete.")
dataset/ETHPy150Open mikar/demimove/demimove/fileops.py/FileOps.undo