From 7ca9a40b491137cc64ec4ad41a711cd086bffb04 Mon Sep 17 00:00:00 2001 From: Mark Smith Date: Thu, 12 Dec 2024 15:47:24 +0100 Subject: [PATCH] fix DiracFile put --- ganga/GangaDirac/Lib/Files/DiracFile.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/ganga/GangaDirac/Lib/Files/DiracFile.py b/ganga/GangaDirac/Lib/Files/DiracFile.py index c2528818af..2d8f98856b 100644 --- a/ganga/GangaDirac/Lib/Files/DiracFile.py +++ b/ganga/GangaDirac/Lib/Files/DiracFile.py @@ -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 ' @@ -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: