Skip to content

Commit

Permalink
style: minor simplifications
Browse files Browse the repository at this point in the history
  • Loading branch information
fstagni committed May 27, 2024
1 parent 7b851fb commit 63d1058
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 20 deletions.
19 changes: 6 additions & 13 deletions src/DIRAC/WorkloadManagementSystem/Client/DownloadInputData.py
Original file line number Diff line number Diff line change
@@ -1,22 +1,16 @@
########################################################################
# File : DownloadInputData.py
# Author : Stuart Paterson
########################################################################

""" The Download Input Data module wraps around the Replica Management
components to provide access to datasets by available site protocols as
defined in the CS for the VO.
components to provide access to datasets by downloading locally
"""
import os
import tempfile
import random
import tempfile

from DIRAC import S_OK, S_ERROR, gLogger
from DIRAC.WorkloadManagementSystem.Client.JobStateUpdateClient import JobStateUpdateClient
from DIRAC.Resources.Storage.StorageElement import StorageElement
from DIRAC import S_ERROR, S_OK, gLogger
from DIRAC.Core.Utilities.Os import getDiskSpace
from DIRAC.Core.Utilities.ReturnValues import returnSingleResult
from DIRAC.DataManagementSystem.Utilities.DMSHelpers import DMSHelpers
from DIRAC.Resources.Storage.StorageElement import StorageElement
from DIRAC.WorkloadManagementSystem.Client.JobStateUpdateClient import JobStateUpdateClient

COMPONENT_NAME = "DownloadInputData"

Expand All @@ -37,15 +31,14 @@ class DownloadInputData:
#############################################################################
def __init__(self, argumentsDict):
"""Standard constructor"""
self.name = COMPONENT_NAME
self.inputData = argumentsDict["InputData"]
self.configuration = argumentsDict["Configuration"]
self.jobID = self.configuration.get("JobID")
# Warning: this contains not only the SEs but also the file metadata
self.fileCatalogResult = argumentsDict["FileCatalog"]
# By default put each input data file into a separate directory
self.inputDataDirectory = argumentsDict.get("InputDataDirectory", "PerFile")

self.log = gLogger.getSubLogger(f"[{self.jobID}]{self.__class__.__name__}")
self.log.showHeaders(True)

Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,8 @@
########################################################################
# File : InputDataByProtocol.py
# Author : Stuart Paterson
########################################################################

""" The Input Data By Protocol module wraps around the Replica Management
components to provide access to datasets by available site protocols as
defined in the CS for the VO.
"""
from DIRAC import S_OK, S_ERROR, gLogger
from DIRAC import S_ERROR, S_OK, gLogger
from DIRAC.Resources.Storage.StorageElement import StorageElement
from DIRAC.WorkloadManagementSystem.Client.JobStateUpdateClient import JobStateUpdateClient

Expand All @@ -18,7 +13,6 @@ class InputDataByProtocol:
#############################################################################
def __init__(self, argumentsDict):
"""Standard constructor"""
self.name = COMPONENT_NAME
self.inputData = argumentsDict["InputData"]
self.configuration = argumentsDict["Configuration"]
self.jobID = self.configuration.get("JobID")
Expand Down

0 comments on commit 63d1058

Please sign in to comment.