about summary refs log tree commit diff
path: root/pkgs/tools/audio/botamusique/catch-invalid-versions.patch
blob: 39b9aae8514ce869c0b74d6d1a0e9656023c8729 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
diff --git a/mumbleBot.py b/mumbleBot.py
index 11bc480..7395f41 100644
--- a/mumbleBot.py
+++ b/mumbleBot.py
@@ -188,11 +188,14 @@ class MumbleBot:
             th.start()
 
         last_startup_version = var.db.get("bot", "version", fallback=None)
-        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))
+        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:
+            pass
 
     # Set the CTRL+C shortcut
     def ctrl_caught(self, signal, frame):