Skip to content

Commit

Permalink
Fix return type of maybe_update_topology_repo()
Browse files Browse the repository at this point in the history
  • Loading branch information
matyasselmeci committed May 20, 2024
1 parent ee45a22 commit fa54522
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/webapp/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ def _update_topology_repo(self):
return False
return True

def maybe_update_topology_repo(self):
def maybe_update_topology_repo(self) -> bool:
"""Update the local git clone of the topology github repo if it hasn't
been updated recently (based on the cache time for self.topology_repo_stamp).
"""
Expand All @@ -163,9 +163,11 @@ def maybe_update_topology_repo(self):
ok = self._update_topology_repo()
if ok:
self.topology_repo_stamp.update(get_timestamp())
return True
else:
self.topology_repo_stamp.try_again()
return self.topology_repo_stamp.data
return False
return bool(self.topology_repo_stamp.data)

def _update_contacts_repo(self):
if not self.config["NO_GIT"]:
Expand Down

0 comments on commit fa54522

Please sign in to comment.