diff --git a/RucioClient.py b/RucioClient.py index 3f014a22a..517c15c79 100755 --- a/RucioClient.py +++ b/RucioClient.py @@ -75,6 +75,8 @@ def getFileCountBlock(self, block): """ try: numFiles = self.get_metadata(self.scope, block)['length'] + if numFiles is None: + raise Exception("block length in rucio is None") except Exception as e: print(str(e)) return 0 @@ -91,6 +93,6 @@ def getFileCountPerBlock(self, dataset): blocks.append((block, self.getFileCountBlock(block))) except Exception as e: print(str(e)) - return 0 + return [] return blocks