def readSession(self): # pylint: disable=W0703 try: self.session = rhnpush_cache.RHNPushSession() self.session.readSession() except Exception: self.session = None
def writeSession(self, session): if self.session: self.session.setSessionString(session) else: self.session = rhnpush_cache.RHNPushSession() self.session.setSessionString(session) if not self.options.no_session_caching: self.session.writeSession()