about summary refs log tree commit homepage
path: root/lib/mogilefs
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2016-08-31 02:21:04 +0000
committerEric Wong <e@80x24.org>2016-08-31 02:48:17 +0000
commit2280594d422cbaa90362105afe695629115ebf8b (patch)
tree1c892b2556dc0dc79fe23260e0912de06b770040 /lib/mogilefs
parent8ef97c54d0e2aa762c75301790f4cd02fc851f0e (diff)
downloadmogilefs-client-2280594d422cbaa90362105afe695629115ebf8b.tar.gz
The 'reject_bad_md5' field may be of an unknown value
before the monitor is ready, so prepare for it and map
it to 'nil' instead of an empty string.  This hopefully
makes the Ruby API more Ruby-ish.
Diffstat (limited to 'lib/mogilefs')
-rw-r--r--lib/mogilefs/admin.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/mogilefs/admin.rb b/lib/mogilefs/admin.rb
index 289dea6..96a7898 100644
--- a/lib/mogilefs/admin.rb
+++ b/lib/mogilefs/admin.rb
@@ -82,6 +82,8 @@ class MogileFS::Admin < MogileFS::Client
         row["reject_bad_md5"] = true
       when "0"
         row["reject_bad_md5"] = false
+      when ""
+        row["reject_bad_md5"] = nil
       end
     end
   end