from aasql2 import aasql d = {'USER': 'grr', 'DB': 'blast', 'PASSWD': ''} # Anything could go wrong ... #a = aasql(d) try: a = aasql(d) except: print "What happened??"