#NEWLINE# def getcomponentbaselineentriesfromstream( self , stream ) : #NEWLINE# #INDENT# filename = self . config . getlogpath ( ( ( 'StreamComponents_' + stream ) + '.txt' ) ) #NEWLINE# command = ( '%s --show-alias n --show-uuid y list components -v -m 30 -r %s %s' % ( self . config . scmcommand , self . config . repo , stream ) ) #NEWLINE# shell . execute ( command , filename ) #NEWLINE# componentbaselinesentries = [ ] #NEWLINE# skippedfirstrow = False #NEWLINE# islinewithcomponent = 2 #NEWLINE# component = '' #NEWLINE# baseline = '' #NEWLINE# componentname = '' #NEWLINE# baselinename = '' #NEWLINE# with open ( filename , 'r' , encoding = shell . encoding ) as file : #NEWLINE# #INDENT# for line in file : #NEWLINE# #INDENT# cleanedline = line . strip ( ) #NEWLINE# if cleanedline : #NEWLINE# #INDENT# if ( not skippedfirstrow ) : #NEWLINE# #INDENT# skippedfirstrow = True #NEWLINE# continue #NEWLINE# #UNINDENT# splittedinformationline = line . split ( '"' ) #NEWLINE# uuidpart = splittedinformationline [ 0 ] . split ( ' ' ) #NEWLINE# if ( ( cleanedline % 2 ) is 0 ) : #NEWLINE# #INDENT# component = uuidpart [ 3 ] . strip ( ) [ 1 : ( - 1 ) ] #NEWLINE# componentname = splittedinformationline [ 1 ] #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# baseline = uuidpart [ 5 ] . strip ( ) [ 1 : ( - 1 ) ] #NEWLINE# baselinename = splittedinformationline [ 1 ] #NEWLINE# #UNINDENT# if ( baseline and component ) : #NEWLINE# #INDENT# componentbaselinesentries . append ( ComponentBaseLineEntry ( component , baseline , componentname , baselinename ) ) #NEWLINE# baseline = '' #NEWLINE# component = '' #NEWLINE# componentname = '' #NEWLINE# baselinename = '' #NEWLINE# #UNINDENT# islinewithcomponent += 1 #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# return componentbaselinesentries