about summary refs log tree commit homepage
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2015-09-14 09:31:49 +0000
committerEric Wong <e@80x24.org>2015-09-14 10:15:01 +0000
commitf1eaa4adeeddcd811d0de5d0abda818b009eb80e (patch)
tree44d9d22279a11fd34ac65a000adf21266b3ec958
parent59aa3ea56e72986bec9482326b4b975ebb4b850a (diff)
downloadmogilefs-client-f1eaa4adeeddcd811d0de5d0abda818b009eb80e.tar.gz
The tracker won't send a utilization field until it has
that data.
-rw-r--r--lib/mogilefs/admin.rb3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/mogilefs/admin.rb b/lib/mogilefs/admin.rb
index 68574ca..289dea6 100644
--- a/lib/mogilefs/admin.rb
+++ b/lib/mogilefs/admin.rb
@@ -69,8 +69,7 @@ class MogileFS::Admin < MogileFS::Client
     rv = clean('devices', 'dev', rv, true, to_i, want)
 
     rv.each do |row|
-      u = row["utilization"] and
-        row["utilization"] = nil == u ? nil : u.to_f
+      u = row["utilization"] and row["utilization"] = u.to_f
 
       case row["observed_state"]
       when ""