Skip to content

Commit

Permalink
Merge pull request #2186 from ganga-devs/removeLFN_fix
Browse files Browse the repository at this point in the history
fix removeLFNs
  • Loading branch information
mesmith75 committed Aug 21, 2023
2 parents 496d9ea + 1ce3569 commit 9d1e047
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions ganga/GangaDirac/Lib/Backends/DiracUtils.py
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ def getReplicas(inSet, credential_requirements=None):
exportToGPI('getReplicas', getReplicas, 'Functions')


def removeLFNs(lfns, credential_requirements=None):
def removeLFNs(inSet, credential_requirements=None):
"""
Remove a list o lfns from Dirac storage
"""
Expand All @@ -252,10 +252,10 @@ def removeLFNs(lfns, credential_requirements=None):
'You must supply, an LFN as a string, a list of LFNs or a GangaDataset with getLFNs() implemented')

res = execute('removeFile(%s)' % str(lfns), cred_req=credential_requirements)
if isinstance(lfns, list) and not len(reps['Successful'].keys()) == len(lfns):
logger.warning("Not successfully removed all files! The following failed: %s" % reps['Failed'].keys())
if isinstance(lfns, list) and not len(res['Successful'].keys()) == len(lfns):
logger.warning("Not successfully removed all files! The following failed: %s" % res['Failed'].keys())

return reps['Successful']
return res['Successful']


exportToGPI('removeLFNs', removeLFNs, 'Functions')

0 comments on commit 9d1e047

Please sign in to comment.