Need to reset error if success.
This commit is contained in:
parent
1a90a625d4
commit
40564ac1e5
@ -23,6 +23,7 @@ if __name__ == '__main__':
|
|||||||
while (time.time() - start_time) < args.timeout:
|
while (time.time() - start_time) < args.timeout:
|
||||||
try:
|
try:
|
||||||
conn = psycopg2.connect(user=args.db_user, host=args.db_host, port=args.db_port, password=args.db_password, dbname=args.db_name)
|
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()
|
conn.close()
|
||||||
break
|
break
|
||||||
except psycopg2.OperationalError as e:
|
except psycopg2.OperationalError as e:
|
||||||
|
@ -23,6 +23,7 @@ if __name__ == '__main__':
|
|||||||
while (time.time() - start_time) < args.timeout:
|
while (time.time() - start_time) < args.timeout:
|
||||||
try:
|
try:
|
||||||
conn = psycopg2.connect(user=args.db_user, host=args.db_host, port=args.db_port, password=args.db_password, dbname=args.db_name)
|
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()
|
conn.close()
|
||||||
break
|
break
|
||||||
except psycopg2.OperationalError as e:
|
except psycopg2.OperationalError as e:
|
||||||
|
@ -23,6 +23,7 @@ if __name__ == '__main__':
|
|||||||
while (time.time() - start_time) < args.timeout:
|
while (time.time() - start_time) < args.timeout:
|
||||||
try:
|
try:
|
||||||
conn = psycopg2.connect(user=args.db_user, host=args.db_host, port=args.db_port, password=args.db_password, dbname=args.db_name)
|
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()
|
conn.close()
|
||||||
break
|
break
|
||||||
except psycopg2.OperationalError as e:
|
except psycopg2.OperationalError as e:
|
||||||
|
Loading…
Reference in New Issue
Block a user