def revert(self, filename=None,
               ignore_discard=False, ignore_expires=False):
        if filename is None:
            if self.filename is not None: filename = self.filename
            else: raise ValueError(MISSING_FILENAME_TEXT)

        self._cookies_lock.acquire()

        old_state = copy.deepcopy(self._cookies)
        self._cookies = {}
        try:
            self.load(filename, ignore_discard, ignore_expires)
        except (LoadError, IOError):
            self._cookies = old_state
            raise

        self._cookies_lock.release()
Clear all cookies and reload cookies from a saved file.
dataset/ETHPy150Open babble/babble/include/jython/Lib/cookielib.py/FileCookieJar.revert