Skip to content
This repository has been archived by the owner on Jun 28, 2024. It is now read-only.

Commit

Permalink
Merge pull request #362 from mweinelt/version-parser-fix
Browse files Browse the repository at this point in the history
Properly fix version handling with packaging>=22.0
  • Loading branch information
TerryGeng authored May 29, 2023
2 parents 9f83cec + 2a20498 commit bd9f9bc
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion mumbleBot.py
Original file line number Diff line number Diff line change
Expand Up @@ -195,12 +195,14 @@ def check_update():
th.start()

last_startup_version = var.db.get("bot", "version", fallback=None)
if self.version != "git":
try:
if not last_startup_version or version.parse(last_startup_version) < version.parse(self.version):
var.db.set("bot", "version", self.version)
if var.config.getboolean("bot", "auto_check_update"):
changelog = util.fetch_changelog()
self.send_channel_msg(tr("update_successful", version=self.version, changelog=changelog))
except version.InvalidVersion:
var.db.set("bot", "version", self.version)

# Set the CTRL+C shortcut
def ctrl_caught(self, signal, frame):
Expand Down

0 comments on commit bd9f9bc

Please sign in to comment.