#NEWLINE# def __verify_third_party_dir( self , is_third_party_present ) : #NEWLINE# #INDENT# matches = fnmatch . filter ( os . listdir ( self . centos_container . get_dist_dir ( unique = True ) ) , 'prestoadmin-*.tar.bz2' ) #NEWLINE# if ( len ( matches ) > 1 ) : #NEWLINE# #INDENT# raise RuntimeError ( ( 'More than one archive found in the dist directory ' + ' ' . join ( matches ) ) ) #NEWLINE# #UNINDENT# cmd_to_run = [ 'tar' , '-tf' , os . path . join ( self . centos_container . get_dist_dir ( unique = True ) , cmd_to_run [ 0 ] ) ] #NEWLINE# popen_obj = subprocess . Popen ( cmd_to_run , cwd = main_dir , stdout = subprocess . PIPE ) #NEWLINE# retcode = popen_obj . returncode #NEWLINE# if retcode : #NEWLINE# #INDENT# raise RuntimeError ( ( 'Non zero return code when executing ' + ' ' . join ( cmd_to_run ) ) ) #NEWLINE# #UNINDENT# stdout = popen_obj . communicate ( ) [ 0 ] #NEWLINE# match = re . search ( '/third-party/' , stdout ) #NEWLINE# if ( is_third_party_present and ( match is None ) ) : #NEWLINE# #INDENT# raise RuntimeError ( 'Expected to have an offline installer with a third-party directory. Found no third-party directory in the installer archive.' ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( ( not is_third_party_present ) and match ) : #NEWLINE# #INDENT# raise RuntimeError ( 'Expected to have an online installer with no third-party directory. Found a third-party directory in the installer archive.' )