Skip to content

Commit

Permalink
convert: Make update check more reliable.
Browse files Browse the repository at this point in the history
  • Loading branch information
heinezen committed Aug 5, 2024
1 parent e5b09ea commit 9d8641e
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion openage/convert/service/init/changelog.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,14 @@ def check_updates(available_modpacks: dict[str, str], game_info_dir: UnionPath):
for targetmod_name, targetmod_def in game_def.target_modpacks.items():
if targetmod_name in available_modpacks:
converter_version = SemanticVersion(targetmod_def["version"])
modpack_version = SemanticVersion(available_modpacks[targetmod_name])
try:
modpack_version = SemanticVersion(available_modpacks[targetmod_name])

except ValueError:
# Some really old converted modpacks don't use semantic versioning
# these should always be updated
modpack_version = SemanticVersion("0.0.0")

if converter_version > modpack_version:
info(("Modpack %s v%s is outdated: "
"newer version v%s is available"),
Expand Down

0 comments on commit 9d8641e

Please sign in to comment.