From 40564ac1e5b7af009e0399de216cb69a20cfd4c6 Mon Sep 17 00:00:00 2001 From: Josh Santos Date: Sun, 31 Mar 2024 18:59:15 -0400 Subject: [PATCH] Need to reset error if success. --- 15.0/wait-for-psql.py | 1 + 16.0/wait-for-psql.py | 1 + 17.0/wait-for-psql.py | 1 + 3 files changed, 3 insertions(+) diff --git a/15.0/wait-for-psql.py b/15.0/wait-for-psql.py index d0a66ea..f8dbbd6 100755 --- a/15.0/wait-for-psql.py +++ b/15.0/wait-for-psql.py @@ -23,6 +23,7 @@ if __name__ == '__main__': while (time.time() - start_time) < args.timeout: try: conn = psycopg2.connect(user=args.db_user, host=args.db_host, port=args.db_port, password=args.db_password, dbname=args.db_name) + error = '' conn.close() break except psycopg2.OperationalError as e: diff --git a/16.0/wait-for-psql.py b/16.0/wait-for-psql.py index d0a66ea..f8dbbd6 100755 --- a/16.0/wait-for-psql.py +++ b/16.0/wait-for-psql.py @@ -23,6 +23,7 @@ if __name__ == '__main__': while (time.time() - start_time) < args.timeout: try: conn = psycopg2.connect(user=args.db_user, host=args.db_host, port=args.db_port, password=args.db_password, dbname=args.db_name) + error = '' conn.close() break except psycopg2.OperationalError as e: diff --git a/17.0/wait-for-psql.py b/17.0/wait-for-psql.py index d0a66ea..f8dbbd6 100755 --- a/17.0/wait-for-psql.py +++ b/17.0/wait-for-psql.py @@ -23,6 +23,7 @@ if __name__ == '__main__': while (time.time() - start_time) < args.timeout: try: conn = psycopg2.connect(user=args.db_user, host=args.db_host, port=args.db_port, password=args.db_password, dbname=args.db_name) + error = '' conn.close() break except psycopg2.OperationalError as e: