Hi Andrei,

There is no need to test a second time as it is tested the first time it is called (at line 565). The urls that would fail are left out there... You can't see it in the diff, but if you look at the code it is safe I think...

Cheers, Philippe

Le 25 avr. 2013 à 14:26, Andrei Tsaregorodtsev a écrit :

> In Resources/Storage/SRM2Storage.py:
> 
> >      listOfResults = resDict['AllResults']
> >      successful = {}
> >      for urlDict in listOfResults:
> >        if "surl" in urlDict and urlDict['surl']:
> > -        pathSURL = self.getUrl( urlDict['surl'] )
> > -        if not pathSURL["OK"]:
> > -          self.log.error("getFileMetadata: %s" % pathSURL["Message"] )
> > -          failed[ urlDict['surl'] ] = pathSURL["Message"]
> > -          continue
> > -        pathSURL = pathSURL['Value']
> > +        # Get back the input value for that surl
> > +        path = urls[self.getUrl( urlDict['surl'] )['Value']]
> If self.getUrl() returns S_OK/S_ERROR structure, the result must be checked:
> 
> result = self.getUrl( urlDict['surl'] )
> if not result['OK']:
> do something to cope with the error
> elif result['Value']:
> path = urls[result['Value']]
> 
> Unfortunately, developers are often lazy to check the result, this is a bad practice
> 
> —
> Reply to this email directly or view it on GitHub.
> 

-- 
Dr Philippe Charpentier
J09210, Physics Department, CERN, CH-1211 Genève 23
LHCb Experiment Distributed Computing Coordinator
Office 2-R-007, Tel : +41 22 767 4244 ,  GSM : +41 76 487 0167
mailto:Philippe.Charpentier@cern.ch  http://cern.ch/Philippe.Charpentier