File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 167167 print ("\t " ,example ,"The 'id' element is incorrect" )
168168
169169'''CapabilityStatement Checker - checks if all Profiles are in the CapabilityStatement'''
170- tree = ET .parse ('./CapabilityStatement/CapabilityStatement-' + mainVar ['project' ]+ '.xml' )
171- root = tree .getroot ()
170+ try :
171+ tree = ET .parse ('./CapabilityStatement/CapabilityStatement-' + mainVar ['project' ]+ '.xml' )
172+ root = tree .getroot ()
173+ except :
174+ root = None
172175
173- print ('CapabilityStatement' )
174- capabilityStatement = []
175- for tag in root .findall ('.//{*}type' ):
176- capabilityStatement .append (tag .attrib ["value" ])
176+ if root != None :
177+ print ('CapabilityStatement' )
178+ capabilityStatement = []
179+ for tag in root .findall ('.//{*}type' ):
180+ capabilityStatement .append (tag .attrib ["value" ])
177181
178- for p in currentProfiles :
179- if p not in capabilityStatement :
180- error = True
181- print ("\t " ,p ,"is missing from the CapabilityStatement" )
182+ for p in currentProfiles :
183+ if p not in capabilityStatement :
184+ error = True
185+ print ("\t " ,p ,"is missing from the CapabilityStatement" )
182186
187+ ''' If any QC issues found within the script, cause the action to fail'''
183188if error == True :
184189 print ("\n Please fix the errors found above" )
185190 sys .exit (2 )
You can’t perform that action at this time.
0 commit comments