From 5587eba968975448b13fcde73cc6926c89865248 Mon Sep 17 00:00:00 2001 From: Vosjedev Date: Thu, 6 Nov 2025 15:31:10 +0100 Subject: Properly handle ports being passed for db --- src/acit/db.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/acit/db.py b/src/acit/db.py index 99ba50d..13cecde 100644 --- a/src/acit/db.py +++ b/src/acit/db.py @@ -29,6 +29,11 @@ class DBPoolManager(plugins.SimplePlugin): HOST=os.getenv("MYSQL_HOST","database") if ":" in HOST: HOST,PORT=HOST.split(":",2) + try: + PORT=int(PORT) + except ValueError: + self._log("Invalid port number, using 3306") + PORT=3306 else: PORT=3306 -- cgit