Commit 8573c4fb authored by Pierre Neyron's avatar Pierre Neyron 🚴
Browse files

[wiki] fix bug with disk size in TB

Bug was for yeti NVMe: 1.0TB reported instead of 1.6TB.
Must force float type for division.
parent a2737770
......@@ -262,7 +262,7 @@ class G5KHardwareGenerator < WikiGenerator
def storage_size_to_text(s)
if s > 1000*1000*1000*1000 # 1 TB
return sprintf("%.1f", s/(1000*1000*1000*1000)) + ' TB'
return sprintf("%.1f", s.to_f/(1000*1000*1000*1000)) + ' TB'
return sprintf("%d", s/(1000*1000*1000)) + ' GB'
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment