Skip to content
Merged
Show file tree
Hide file tree
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
10 changes: 5 additions & 5 deletions DataManagementSystem/Client/ReplicaManager.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ def _callFileCatalogFcnSingleFile( self, lfn, method, argsDict=None, catalogs=No
argsDict = argsDict if argsDict else dict()
catalogs = catalogs if catalogs else list()
## checjk type
if not lfn or type(lfn) not in ( ListType, StringTypes, DictType ):
if not lfn or type(lfn) not in StringTypes + ( ListType, DictType ):
return S_ERROR( "wrong type (%s) for argument 'lfn'" % type(lfn) )
singleLfn = lfn
if type( lfn ) == ListType:
Expand Down Expand Up @@ -96,7 +96,7 @@ def _callFileCatalogFcn( self, lfn, method, argsDict = None, catalogs = None ):
argsDict = argsDict if argsDict else dict()
catalogs = catalogs if catalogs else list()
lfns = None
if not lfn or type(lfn) not in ( StringTypes, ListType, DictType ):
if not lfn or type(lfn) not in StringTypes + ( ListType, DictType ):
errStr = "ReplicaManager._callFileCatalogFcn: Wrong 'lfn' argument."
gLogger.error( errStr )
return S_ERROR( errStr )
Expand Down Expand Up @@ -462,7 +462,7 @@ def _callStorageElementFcnSingleFile( self, storageElementName, pfn, method, arg
:param str method: name of the :StorageElement: method to be invoked
:param dict argsDict: additional keyword arguments that are required for the :method:
"""
argsDict = argsDict if argsDict else dict()
argsDict = argsDict if argsDict else {}
## check type
if type( pfn ) == ListType:
pfn = pfn[0]
Expand Down Expand Up @@ -866,7 +866,7 @@ def _callReplicaSEFcnSingleFile( self, storageElementName, lfn, method, argsDict
:param dict argsDict: kwargs of :method:
"""
## default value
argsDict = argsDict if argsDict else dict()
argsDict = argsDict if argsDict else {}
## get single LFN
singleLfn = lfn
if type( lfn ) == ListType:
Expand All @@ -890,7 +890,7 @@ def _callReplicaSEFcn( self, storageElementName, lfn, method, argsDict=None ):
:param mixed lfn: a LFN str, list of LFNs or dict with LFNs as keys
"""
## default value
argsDict = argsDict if argsDict else dict()
argsDict = argsDict if argsDict else {}
## get replicas for lfn
res = self._callFileCatalogFcn( lfn, "getReplicas" )
if not res["OK"]:
Expand Down
5 changes: 4 additions & 1 deletion Resources/Storage/StorageElement.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,8 @@ def getStatus( self ):
- Read: True (is allowed), False (it is not allowed)
- Write: True (is allowed), False (it is not allowed)
- Remove: True (is allowed), False (it is not allowed)
- Check: True (is allowed), False (it is not allowed). NB: Check always allowed IF Read is allowed (regardless of what set in the Check option of the configuration)
- Check: True (is allowed), False (it is not allowed).
NB: Check always allowed IF Read is allowed (regardless of what set in the Check option of the configuration)
- DiskSE: True if TXDY with Y > 0 (defaults to True)
- TapeSE: True if TXDY with X > 0 (defaults to False)
- TotalCapacityTB: float (-1 if not defined)
Expand Down Expand Up @@ -551,6 +552,8 @@ def __executeFunction( self, pfn, method, argsDict = None ):
'pfn' is the physical file name (as registered in the LFC)
'method' is the functionality to be executed
"""
## default args = no args
argsDict = argsDict if argsDict else {}
if type( pfn ) in types.StringTypes:
pfns = {pfn:False}
elif type( pfn ) == types.ListType:
Expand Down
2 changes: 1 addition & 1 deletion TransformationSystem/Client/Transformation.py
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ def __executeOperation( self, operation, *parms, **kwds ):
fcn = getattr( self.transClient, operation )
if not fcn:
return S_ERROR("Unable to invoke %s, it isn't a member funtion of TransformationClient" )
res = fcn( transID, *param, **kwds )
res = fcn( transID, *parms, **kwds )
if printOutput:
self._prettyPrint( res )
return res
Expand Down