def get_topology(self) -> Topology: if self.topology.should_update(): ok = self._update_topology_repo() self.topology.update(rg_reader.get_topology( self.topology_dir, self.get_contacts_data()), bump_timestamp=ok) return self.topology.data
def get_topology(self) -> Topology: if self.topology.should_update(): ok = self._update_topology_repo() if ok: self.topology.update(rg_reader.get_topology(self.topology_dir, self.get_contacts_data())) else: self.topology.try_again() return self.topology.data
def get_topology(self) -> Topology: if self.topology.should_update(): ok = self._update_topology_repo() if ok: try: self.topology.update(rg_reader.get_topology(self.topology_dir, self.get_contacts_data(), strict=self.strict)) except Exception: if self.strict: raise log.exception("Failed to update topology") self.topology.try_again() else: self.topology.try_again() return self.topology.data
def _get_topology(): global _topology if not _topology: _topology = get_topology("../topology", _get_contacts_data()) return _topology