Skip to content
Merged
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
8 changes: 4 additions & 4 deletions src/DIRAC/Resources/Storage/StorageElement.py
Original file line number Diff line number Diff line change
Expand Up @@ -438,10 +438,6 @@ def getOccupancy(self, unit="MB", **kwargs):

kwargs["occupancyLFN"] = occupancyLFN

filteredPlugins = self.__filterPlugins("getOccupancy")
if not filteredPlugins:
return S_ERROR(errno.EPROTONOSUPPORT, "No storage plugins to query the occupancy")

# Call occupancy plugin if requested
occupancyPlugin = self.options.get("OccupancyPlugin")
if occupancyPlugin:
Expand All @@ -459,6 +455,10 @@ def getOccupancy(self, unit="MB", **kwargs):
except Exception as e:
return S_ERROR(f"Occupancy plugin failed: {str(e)}")

filteredPlugins = self.__filterPlugins("getOccupancy")
if not filteredPlugins:
return S_ERROR(errno.EPROTONOSUPPORT, "No storage plugins to query the occupancy")

# Try all of the storages one by one
for storage in filteredPlugins:
# The result of the plugin is always in B
Expand Down
Loading