From 71f4ce6fbb7993b4b580473aac7b0fe779b07290 Mon Sep 17 00:00:00 2001 From: Anshuman Tiwari Date: Tue, 19 Aug 2025 16:42:38 +0530 Subject: [PATCH 1/4] fix: logger info fix --- dcs_core/integrations/databases/sybase.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dcs_core/integrations/databases/sybase.py b/dcs_core/integrations/databases/sybase.py index bf8e51e..7a8aa84 100644 --- a/dcs_core/integrations/databases/sybase.py +++ b/dcs_core/integrations/databases/sybase.py @@ -70,10 +70,10 @@ def connect(self) -> Any: conn_dict["host"] = host or server try: - logger.debug(f"Attempting FreeTDS connection with config: {conn_dict}") + logger.debug(f"Attempting FreeTDS connection") self.connection = pyodbc.connect(**conn_dict) logger.info( - f"Successfully connected to Sybase using FreeTDS: {conn_dict}" + f"Successfully connected to Sybase using FreeTDS" ) return self.connection except Exception as e: @@ -150,7 +150,7 @@ def connect(self) -> Any: try: logger.debug( - f"Attempting connection with config: {final_config}" + f"Attempting connection ..." ) self.connection = pyodbc.connect(**final_config) logger.info( From ba92ac7bc98221f2f426b3b508fc5272e78ff6b2 Mon Sep 17 00:00:00 2001 From: Anshuman Tiwari Date: Tue, 19 Aug 2025 16:50:41 +0530 Subject: [PATCH 2/4] fix: logger info fix --- dcs_core/integrations/databases/sybase.py | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/dcs_core/integrations/databases/sybase.py b/dcs_core/integrations/databases/sybase.py index 7a8aa84..25dbe0a 100644 --- a/dcs_core/integrations/databases/sybase.py +++ b/dcs_core/integrations/databases/sybase.py @@ -155,17 +155,12 @@ def connect(self) -> Any: self.connection = pyodbc.connect(**final_config) logger.info( f"Successfully connected to Sybase using: " - f"driver={driver}, " - f"{attempt['key']}={attempt['value']}, " - f"port_config={port_config}, " - f"ase_config={ase_config}" + f"driver={driver}" ) return self.connection except Exception as e: error_msg = ( - f"Failed with {attempt['key']}={attempt['value']}, " - f"port_config={port_config}, " - f"ase_config={ase_config}: {str(e)}" + "Failed to connect to sybase." ) logger.debug(error_msg) errors.append(error_msg) From f4f7b3b02fb4e9e5f502f8697bc3b54b4a72a53a Mon Sep 17 00:00:00 2001 From: Anshuman Tiwari Date: Tue, 19 Aug 2025 18:39:16 +0530 Subject: [PATCH 3/4] fix: removed f strings --- dcs_core/integrations/databases/sybase.py | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/dcs_core/integrations/databases/sybase.py b/dcs_core/integrations/databases/sybase.py index 25dbe0a..c9501ce 100644 --- a/dcs_core/integrations/databases/sybase.py +++ b/dcs_core/integrations/databases/sybase.py @@ -70,11 +70,9 @@ def connect(self) -> Any: conn_dict["host"] = host or server try: - logger.debug(f"Attempting FreeTDS connection") + logger.debug("Attempting FreeTDS connection") self.connection = pyodbc.connect(**conn_dict) - logger.info( - f"Successfully connected to Sybase using FreeTDS" - ) + logger.info("Successfully connected to Sybase using FreeTDS") return self.connection except Exception as e: error_msg = f"Failed to connect to Sybase with FreeTDS: {str(e)}" @@ -149,12 +147,10 @@ def connect(self) -> Any: final_config.update(ase_config) try: - logger.debug( - f"Attempting connection ..." - ) + logger.debug("Attempting connection ...") self.connection = pyodbc.connect(**final_config) logger.info( - f"Successfully connected to Sybase using: " + "Successfully connected to Sybase using: " f"driver={driver}" ) return self.connection From f1a2133dc25c636b1814e09e6a5d33f4a7acecb1 Mon Sep 17 00:00:00 2001 From: Anshuman Tiwari Date: Tue, 19 Aug 2025 18:41:50 +0530 Subject: [PATCH 4/4] fix: file format --- dcs_core/integrations/databases/sybase.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/dcs_core/integrations/databases/sybase.py b/dcs_core/integrations/databases/sybase.py index c9501ce..1868a5c 100644 --- a/dcs_core/integrations/databases/sybase.py +++ b/dcs_core/integrations/databases/sybase.py @@ -155,9 +155,7 @@ def connect(self) -> Any: ) return self.connection except Exception as e: - error_msg = ( - "Failed to connect to sybase." - ) + error_msg = "Failed to connect to sybase." logger.debug(error_msg) errors.append(error_msg) continue