Skip to content

Commit 45e9d1e

Browse files
committed
fix: remove debug trace
1 parent 78cbed8 commit 45e9d1e

2 files changed

Lines changed: 1 addition & 15 deletions

File tree

src/DIRAC/Resources/Catalog/RucioFileCatalogClient.py

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -708,26 +708,18 @@ def getFileUserMetadata(self, path):
708708
"""Get the meta data attached to a file, but also to
709709
all its parents
710710
"""
711-
print('in getfileusermetadata')
712711
path=next(iter(path))
713-
print('in getfileusermetadata1'+path)
714-
715712
resDict = {"Successful": {}, "Failed": {}}
716713
try:
717-
print('in getfileusermetadata2')
718714
did = self.__getDidsFromLfn(path)
719715
meta = next(self.client.get_metadata_bulk(dids=[did], inherit=True, plugin="ALL"))
720-
print('in getfileusermetadata3')
721-
print(meta)
722716
if meta["did_type"] == "FILE": # Should we also return the metadata for the directories ?
723717
resDict["Successful"][path] = meta
724718
else:
725719
resDict["Failed"][path] = "Not a file"
726-
print('in getfileusermetadata4')
727720
except DataIdentifierNotFound:
728721
resDict["Failed"][path] = "No such file or directory"
729722
except Exception as err:
730-
print(err)
731723
return S_ERROR(str(err))
732724
return S_OK(resDict)
733725

@@ -775,7 +767,6 @@ def setMetadataBulk(self, pathMetadataDict):
775767

776768
@checkCatalogArguments
777769
def setMetadata(self, path, metadataDict):
778-
print('in setmetadata')
779770
"""Add metadata to the given path"""
780771
pathMetadataDict = {}
781772
path=next(iter(path))
@@ -806,10 +797,8 @@ def removeMetadata(self, path, metadata):
806797
return S_ERROR(str(err))
807798
return S_OK()
808799

809-
#@checkCatalogArguments
810800
def findFilesByMetadata(self, metadataFilterDict, path="/", timeout=120):
811801
"""find the dids for the given metadataFilterDict"""
812-
print(metadataFilterDict)
813802
ruciometadataFilterDict=self.__transform_DIRAC_filter_dict_to_Rucio_filter_dict([metadataFilterDict])
814803
dids=[]
815804
for scope in self.scopes:
@@ -858,7 +847,6 @@ def __transform_dict_with_in_operateur(self, DIRAC_dict_with_in_operator_list):
858847
input_dict_list = [{'particle': {'in': ['proton','electron']},'site': {'in': [ "LaPalma", 'paranal']},'configuration_id': {'=': 14} } ]
859848
return = [{'particle': 'proton', 'site': 'LaPalma', 'configuration_id': {'=': 14} }, {'particle': 'proton', 'site': 'paranal', 'configuration_id': {'=': 14} }, {'particle': 'electron', 'site': 'LaPalma', 'configuration_id': {'=': 14} }, {'particle': 'electron', 'site': 'paranal', 'configuration_id': {'=': 14} }]
860849
"""
861-
print (DIRAC_dict_with_in_operator_list)
862850
if not isinstance(DIRAC_dict_with_in_operator_list, list):
863851
raise TypeError("DIRAC_dict_with_in_operator_list must be a list of dictionaries")
864852

@@ -904,8 +892,6 @@ def __transform_DIRAC_filter_dict_to_Rucio_filter_dict(self, DIRAC_filter_dict_l
904892
input_dict_list = [{'particle': {'in': ['proton','electron']},'site': {'in': [ "LaPalma", 'paranal']},'configuration_id': {'=': 14} } ]
905893
return = [{'particle': 'proton', 'site': 'LaPalma', 'configuration_id': 14}, {'particle': 'proton', 'site': 'paranal', 'configuration_id': 14}, {'particle': 'electron', 'site': 'LaPalma', 'configuration_id': 14}, {'particle': 'electron', 'site': 'paranal', 'configuration_id': 14}]
906894
"""
907-
908-
909895
break_detected=True
910896
DIRAC_expanded_filters=DIRAC_filter_dict_list
911897
while break_detected:

src/DIRAC/Resources/Catalog/test/Test_RucioFileCatalogClient.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,4 +126,4 @@ def test_findFilesByMetadata_with_error(self):
126126
self.assertIn('Test error', result['Message'])
127127

128128
if __name__ == '__main__':
129-
unittest.main()
129+
unittest.main()

0 commit comments

Comments
 (0)