Exemplo n.º 1
0
 def _load(self, path=None):
     if path is None:
         path = self._get_file_path()
     try:
         f = open(path, "rb")
         try:
             return pickle.load(f)
         finally:
             f.close()
     except (IOError, EOFError):
         return None
Exemplo n.º 2
0
 def _load(self, path=None):
     if path is None:
         path = self._get_file_path()
     try:
         f = open(path, "rb")
         try:
             return pickle.load(f)
         finally:
             f.close()
     except (IOError, EOFError):
         return None
Exemplo n.º 3
0
 def _load(self, path=None):
     assert self.locked, "The session load without being locked.  Check your tools' priority levels."
     if path is None:
         path = self._get_file_path()
     try:
         f = open(path, "rb")
         try:
             return pickle.load(f)
         finally:
             f.close()
     except (IOError, EOFError):
         e = sys.exc_info()[1]
         if self.debug:
             cherrypy.log("Error loading the session pickle: %s" % e, 'TOOLS.SESSIONS')
         return None
Exemplo n.º 4
0
    def _load(self, path=None):
        cledef_load = "_load_593"
        f=open('/Users/i325009/Documents/python/cherrypy-project/logtool/out.txt','w')
        print >> f,cledef_load
        f.close()
 
        assert self.locked, ("The session load without being locked.  "
                             "Check your tools' priority levels.")
        if path is None:
            path = self._get_file_path()
        try:
            f = open(path, "rb")
            try:
                return pickle.load(f)
            finally:
                f.close()
        except (IOError, EOFError):
            e = sys.exc_info()[1]
            if self.debug:
                cherrypy.log("Error loading the session pickle: %s" %
                             e, 'TOOLS.SESSIONS')
            return None