From d2155634fd904854a3c6969e53ae2396617679dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Rosi=C5=84ski?= Date: Wed, 15 May 2024 15:44:13 +0200 Subject: [PATCH] Fix pg connect hang --- .gitignore | 1 + pg-migration-tool/main.py | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 7c0fd7e..e793a92 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ +config.yaml *.log .DS_Store .huskyrc.json diff --git a/pg-migration-tool/main.py b/pg-migration-tool/main.py index 6755a47..8aece7f 100644 --- a/pg-migration-tool/main.py +++ b/pg-migration-tool/main.py @@ -98,8 +98,8 @@ async def check_connection_for_db(self, db, label) -> bool: ) self.query_one(label).update(f"{db["db_connection_host"]} connection successful.") return True - except PostgresError as e: - self.query_one(label).update(f"{db["db_connection_host"]} connection failed with password {db_password}: {e}") + except Exception as e: + self.query_one(label).update(f"{db["db_connection_host"]} connection failed: {e}") return False async def decrypt_password(self, db, label) -> str: