def store(self): try: if self._store is None: self.store = LiteAxolotlStore( StorageTools.constructPath( self.getProp( YowAuthenticationProtocolLayer.PROP_CREDENTIALS) [0], self.__class__._DB)) return self._store except AttributeError: return None
def store(self): if self._store is None: self.store = LiteAxolotlStore( StorageTools.constructPath( self.getProp( YowAuthenticationProtocolLayer.PROP_CREDENTIALS)[0], self.__class__._DB ) ) self.state = self.__class__._STATE_HASKEYS if self.store.getLocalRegistrationId() is not None \ else self.__class__._STATE_INIT return self._store
def store(self): if self._store is None: conn_str = self.getProp(self.__class__.PROP_CONNECTION_STRING) conn_type = self.getProp(self.__class__.PROP_STORE_TYPE) phone_number = self.getProp( YowAuthenticationProtocolLayer.PROP_CREDENTIALS)[0] if (conn_type == 'mysql' and conn_str): # try: self.store = MyAxolotlStore(conn_str, phone_number) # except: # logger.error("ERROR:: {} ".format(sys.exc_info()[1])) else: self.store = LiteAxolotlStore( StorageTools.constructPath(phone_number, self.__class__._DB)) self.state = self.__class__._STATE_HASKEYS if self.store.getLocalRegistrationId() is not None \ else self.__class__._STATE_INIT return self._store