Skip to content

Commit

Permalink
Update self_update.py
Browse files Browse the repository at this point in the history
  • Loading branch information
MathiasExorde authored Jul 8, 2023
1 parent b5cb6d6 commit 88f6f29
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions exorde/self_update.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,13 @@ def normalize_version(version_string):

async def self_update():
try:
logging.info("[SELF CLIENT UPDATE] Checking...")
# Try to get latest tag, if not possible, log and return
try:
latest_tag = await get_latest_tag()
except Exception as e:
logging.info("[SELF CLIENT UPDATE] Unable to retrieve latest tag from GitHub: %s", e)
return

# If latest_tag is not valid string, log and return
if latest_tag is None or not isinstance(latest_tag, str):
logging.info("[SELF CLIENT UPDATE] Invalid latest tag retrieved from GitHub")
return

# Try to get local version, if not found set default version
try:
Expand Down Expand Up @@ -51,4 +47,4 @@ async def self_update():
except version.InvalidVersion:
logging.info("Error parsing version string")
except Exception as e:
logging.info("[SELF CLIENT UPDATE] Error during self update: %s", e)
logging.info("[SELF CLIENT UPDATE] Error during self update: %s", e)

0 comments on commit 88f6f29

Please sign in to comment.