Sep-02-2024, 11:17 AM
Hi,
I'm a little bit confused as the following code prints the exception provoked by the wrong password twice. Does anybody know why?
Richard
I'm a little bit confused as the following code prints the exception provoked by the wrong password twice. Does anybody know why?
#!/usr/bin/python3
import pymssql, psycopg2
import psycopg2.extras
import sys
psqluser = "<USERNAME>"
psqlpassword = "<WRONG-PASSWORD>"
psqlserver = "<IP-ADRESSE>"
psqldatabase = "<DATABASE>"
try:
psqlconn = psycopg2.connect(dbname=psqldatabase, user=psqluser, password=psqlpassword, host=psqlserver)
except Exception as err:
print(err)
exit(1)ThanksRichard
