Skip to content

Commit

Permalink
dws: improve error message
Browse files Browse the repository at this point in the history
Problem: the error message for requesting too much lustre storage
gives a float, but an integer would be better and more consistent
with the other file system types.

Provide an integer in the error message by doing integer division
instead of normal float division.
  • Loading branch information
jameshcorbett committed Aug 31, 2024
1 parent aa480c0 commit 8934cdd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/python/flux_k8s/directivebreakdown.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def validate(self, nodecount):
requested = getattr(self, attr)
allowable = getattr(type(self), attr)
if attr == "lustre":
requested = requested / nodecount
requested = requested // nodecount
if allowable is not None and requested > allowable:
raise ValueError(
f"Requested a total of {requested} GiB of {attr} storage "
Expand Down

0 comments on commit 8934cdd

Please sign in to comment.