Skip to content

Commit

Permalink
Invert if-else logic
Browse files Browse the repository at this point in the history
  • Loading branch information
albireox committed Jan 23, 2025
1 parent c003aa5 commit 4aa0865
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/gort/overwatcher/helpers/dome.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ async def status(self, force: bool = False):
"""

if not force:
if force:
status = await self.gort.enclosure.status()
labels = status["dome_status_labels"]
else:
Expand All @@ -74,7 +74,7 @@ async def status(self, force: bool = False):
if labels is None:
raise ValueError("dome_status_labels is None.")
except Exception:
return await self.status(force=False)
return await self.status(force=True)

labels = labels.split(",")

Expand Down

0 comments on commit 4aa0865

Please sign in to comment.