Commit c897fa03 authored by Nicolo Magini's avatar Nicolo Magini
Browse files

Properly handle exception if 'lfn-prefix' is missing in the fallback section

of the site-local-config
parent 20c7eaeb
......@@ -231,9 +231,9 @@ class StageOutDiagnostic:
seName = self.siteConf.fallbackStageOut[fallbackCount]['se-name']
command = self.siteConf.fallbackStageOut[fallbackCount]['command']
options = self.siteConf.fallbackStageOut[fallbackCount].get('option', None)
if self.siteConf.fallbackStageOut[fallbackCount]['lfn-prefix']:
try:
targetPFN = self.siteConf.fallbackStageOut[fallbackCount]['lfn-prefix'] + self.testLFN
else:
except KeyError:
targetPFN = self.testLFN
try:
......@@ -278,9 +278,9 @@ class StageOutDiagnostic:
for fallback in self.siteConf.fallbackStageOut:
commandList.append( fallback[ 'command' ])
if fallback['lfn-prefix']:
try:
pfnList.append( fallback[ 'lfn-prefix' ] + self.testLFN )
else:
except KeyError:
pfnList.append( self.testLFN )
wasSuccessful = False
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment