Skip to content
This repository was archived by the owner on Sep 12, 2024. It is now read-only.

Commit d154cc2

Browse files
authored
Merge pull request #590 from CMSCompOps/invalid_rucio_block_lenght
Invalid rucio block lenght
2 parents b37ab69 + 865fee1 commit d154cc2

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

RucioClient.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,8 @@ def getFileCountBlock(self, block):
7575
"""
7676
try:
7777
numFiles = self.get_metadata(self.scope, block)['length']
78+
if numFiles is None:
79+
raise Exception("block length in rucio is None")
7880
except Exception as e:
7981
print(str(e))
8082
return 0
@@ -91,6 +93,6 @@ def getFileCountPerBlock(self, dataset):
9193
blocks.append((block, self.getFileCountBlock(block)))
9294
except Exception as e:
9395
print(str(e))
94-
return 0
96+
return []
9597
return blocks
9698

0 commit comments

Comments
 (0)