|
From: Francisco C. <fra...@gm...> - 2013-09-12 17:07:56
|
Hello,
I have a question related with the connections. I am using the
following code for that:
try:
connection = connectionForURI('postgres://'+user+':'+password+'@
'+host+'/'+database)
sqlhub.processConnection = connection
connection.query("SELECT 1")
except OperationalError:
print "error"
but, I don't know if the error is because the user and password are wrong
or the sever is not working. How can I verify that? for example, maybe,
with a error code but I don't know how to get it.
Cheers,
|