Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix DiracFile put #2392

Merged
merged 1 commit into from
Dec 12, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions ganga/GangaDirac/Lib/Files/DiracFile.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ class DiracFile(IGangaFile):
'localDir': SimpleItem(defvalue=None, copyable=1, typelist=['str', 'type(None)'],
doc='local dir where the file is stored, '
'used from get and put methods'),
'locations': SimpleItem(defvalue=[], copyable=1, typelist=['str'], sequence=1,
'locations': SimpleItem(defvalue=[], copyable=1, typelist=[list], sequence=1,
doc="list of SE locations where the outputfiles are uploaded"),
'compressed': SimpleItem(defvalue=False, typelist=['bool'], protected=0,
doc='Should the output file be compressed '
Expand Down Expand Up @@ -832,14 +832,16 @@ def put(self, lfn='', force=False, uploadSE="", replicate=False):
if regex.search(self.namePattern) is not None:
d.lfn = lfn
d.remoteDir = os.path.dirname(lfn)
d.locations = lfn_out.get('allDiracSE', '')
if lfn_out.get('DiracSE'):
d.locations.append(lfn_out.get('DiracSE'))
d.guid = guid
outputFiles.append(d)
continue
else:
self.lfn = lfn
self.remoteDir = os.path.dirname(lfn)
self.locations = lfn_out.get('allDiracSE', '')
if lfn_out.get('DiracSE'):
self.locations.append(lfn_out.get('DiracSE'))
self.guid = guid

if replicate:
Expand Down
Loading