#NEWLINE# def fetchone( self , query , args = None ) : #NEWLINE# #INDENT# 'Execute a query and return one row' #NEWLINE# try : #NEWLINE# #INDENT# curs = pgexecute ( self . conn , query , args ) #NEWLINE# #UNINDENT# except Exception as exc : #NEWLINE# #INDENT# raise exc #NEWLINE# #UNINDENT# row = curs . fetchone ( ) #NEWLINE# curs . close ( ) #NEWLINE# return row