def restore_session(args): # args.settings is provided when restoring from a session. args.settings = None if args.session is None: return session = Session(args.session) if session.load(): args.settings = session args.repo = session.repo
def commitData(self, session_mgr): """Save session data""" if self.view is None: return sid = ustr(session_mgr.sessionId()) skey = ustr(session_mgr.sessionKey()) session_id = '%s_%s' % (sid, skey) session = Session(session_id, repo=core.getcwd()) self.view.save_state(settings=session)