From c538099fd86ef1cde35e6624d6d9d982096765c4 Mon Sep 17 00:00:00 2001 From: zaihuaji Date: Thu, 23 Jan 2025 15:56:03 -0600 Subject: [PATCH 1/2] fix syntax error --- src/rda_python_common/PgDBI.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/rda_python_common/PgDBI.py b/src/rda_python_common/PgDBI.py index 4aecf10..6659edd 100644 --- a/src/rda_python_common/PgDBI.py +++ b/src/rda_python_common/PgDBI.py @@ -521,7 +521,7 @@ def pgconnect(reconnect = 0, pgcnt = 0, autocommit = True): config['host'] = PGDBI['DBHOST'] if PGDBI['DBHOST'] else PGDBI['DEFHOST'] if not PGDBI['DBPORT']: PGDBI['DBPORT'] = get_dbport(PGDBI['DBNAME']) if PGDBI['DBPORT']: config['port'] = PGDBI['DBPORT'] - config = ['password'] = get_pgpass_password() + config['password'] = get_pgpass_password() sqlstr = "psycopg2.connect(**{})".format(config) if PgLOG.PGLOG['DBGLEVEL']: PgLOG.pgdbg(1000, sqlstr) From 4d0a8d51b129043d7c17720aaca1a4e2b8f03e2b Mon Sep 17 00:00:00 2001 From: zaihuaji Date: Thu, 23 Jan 2025 16:06:22 -0600 Subject: [PATCH 2/2] save --- src/rda_python_common/PgDBI.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/rda_python_common/PgDBI.py b/src/rda_python_common/PgDBI.py index 6659edd..71e7916 100644 --- a/src/rda_python_common/PgDBI.py +++ b/src/rda_python_common/PgDBI.py @@ -508,10 +508,6 @@ def pgconnect(reconnect = 0, pgcnt = 0, autocommit = True): elif reconnect: reconnect = 0 # initial connection -# if PGDBI['VWHOST'] and PGDBI['VWHOME'] and PGDBI['DBSHOST'] == PGDBI['VWSHOST'] and PGDBI['SCNAME'] == PGDBI['VWNAME']: -# slave = "/{}/{}.slave".format(PGDBI['VWHOME'], PGDBI['VWHOST']) -# if not op.exists(slave): default_scname() - while True: config = {'database' : PGDBI['DBNAME'], 'user' : PGDBI['LNNAME']}