#NEWLINE# def run_pg_dump( self , dumpfile , srcdb = False , incldata = False ) : #NEWLINE# #INDENT# 'Run pg_dump using special scripts or directly (on Travis-CI)\n\n        :param dumpfile: path to the pg_dump output file\n        :param srcdb: run against source database\n        ' #NEWLINE# if TRAVIS : #NEWLINE# #INDENT# pg_dumpver = 'pg_dump' #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# v = self . srcdb . _version #NEWLINE# pg_dumpver = ( 'pg_dump%d%d' % ( ( v // 10000 ) , ( ( v - ( ( v // 10000 ) * 10000 ) ) // 100 ) ) ) #NEWLINE# if ( sys . platform == 'win32' ) : #NEWLINE# #INDENT# pg_dumpver += '.bat' #NEWLINE# #UNINDENT# #UNINDENT# dbname = ( self . srcdb . name if srcdb else self . db . name ) #NEWLINE# args = [ pg_dumpver ] #NEWLINE# args . extend ( self . _db_params ( ) ) #NEWLINE# if ( not incldata ) : #NEWLINE# #INDENT# args . extend ( [ '-s' ] ) #NEWLINE# #UNINDENT# args . extend ( [ '-f' , dumpfile , dbname ] ) #NEWLINE# subprocess . check_call ( args )