#NEWLINE# def collect( self ) : #NEWLINE# #INDENT# if ( psycopg2 is None ) : #NEWLINE# #INDENT# self . log . error ( 'Unable to import module psycopg2' ) #NEWLINE# return None #NEWLINE# #UNINDENT# for ( instance , configuration ) in self . config [ 'instances' ] . iteritems ( ) : #NEWLINE# #INDENT# connection = psycopg2 . connect ( configuration [ 'dsn' ] ) #NEWLINE# connection . set_isolation_level ( psycopg2 . extensions . ISOLATION_LEVEL_AUTOCOMMIT ) #NEWLINE# self . _collect_for_instance ( instance , connection )