Skip to content

Move the check on SystemConfig at for loop level

Marco Corvo requested to merge corvo/LHCbDIRAC:YATemplateFix2 into master

@romanov was right (plus I also mistyped a letter in 'SystemConfig'). I moved the check on SystemConfig directly at the for loop level:


for parameter, value in itertools.izip( stepDict['ParameterNames'],
                                              stepDict['Records'][0] ):
  ...
  if parameter == 'SystemConfig' and re.search( 'slc5', value):
    p = re.compile(r'\$\w+/Persistency/Compression-[A-Z]{4}-[1-9].py;?')
    if p.search(stepsListDictItem['OptionFiles']):
      stepsListDictItem['OptionFiles'] = p.sub('', stepsListDictItem['OptionFiles'])

  stepsListDictItem[parameter] = value # Fixing what decided

I modified the uni tests accordingly as now when there's a slc5 in SystemConfig, the compression level is removed

Merge request reports

Loading