Skip to content
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
13 changes: 8 additions & 5 deletions DataManagementSystem/scripts/dirac-dms-add-file.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,11 @@ def getDict( item_list ):
lfn_dict['guid'] = guid
return lfn_dict

from DIRAC.DataManagementSystem.Client.DataManager import DataManager
from DIRAC import gLogger
import DIRAC
exitCode = 0

lfns = []
if len( args ) == 1:
inputFileName = args[0]
Expand All @@ -67,14 +72,12 @@ def getDict( item_list ):
items[0] = items[0].replace( 'LFN:', '' ).replace( 'lfn:', '' )
lfns.append( getDict( items ) )
inputFile.close()
else:
gLogger.error("Error: LFN list '%s' missing." % inputFileName)
exitCode = 4
else:
lfns.append( getDict( args ) )

from DIRAC.DataManagementSystem.Client.DataManager import DataManager
from DIRAC import gLogger
import DIRAC
exitCode = 0

dm = DataManager()
for lfn in lfns:
if not os.path.exists( lfn['localfile'] ):
Expand Down