about summary refs log tree commit homepage
path: root/lib/mogilefs/admin.rb
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2012-06-29 20:33:10 +0000
committerEric Wong <normalperson@yhbt.net>2012-06-29 20:33:10 +0000
commit76ef95496eb5f38434c28b8080e08b668a8bf4f6 (patch)
tree8a9f013a46ffc00670f03a8eb7d9dc0a9b01c7e8 /lib/mogilefs/admin.rb
parent17128d5b73c8ad12f45c3888eded5d7a96a5e46a (diff)
downloadmogilefs-client-76ef95496eb5f38434c28b8080e08b668a8bf4f6.tar.gz
This is a boolean value on the server and we always try to
make our return values Ruby-friendly
Diffstat (limited to 'lib/mogilefs/admin.rb')
-rw-r--r--lib/mogilefs/admin.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/mogilefs/admin.rb b/lib/mogilefs/admin.rb
index 2b3540a..06ba2a5 100644
--- a/lib/mogilefs/admin.rb
+++ b/lib/mogilefs/admin.rb
@@ -69,6 +69,12 @@ class MogileFS::Admin < MogileFS::Client
     rv.each do |row|
       u = row["utilization"] and
         row["utilization"] = nil == u ? nil : u.to_f
+      case row["reject_bad_md5"]
+      when "1"
+        row["reject_bad_md5"] = true
+      when "0"
+        row["reject_bad_md5"] = false
+      end
     end
   end