From 547d0985eae7a270f5d81009f22c0e74af09c5fd Mon Sep 17 00:00:00 2001 From: Javi Fontan Date: Thu, 1 Dec 2011 18:03:16 +0000 Subject: [PATCH] fix a bug setting quota configuration (cherry picked from commit d1054d465e463a1d99a46585a1bbfac8cfe4ef47) --- src/authm_mad/remotes/quota/quota.rb | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/authm_mad/remotes/quota/quota.rb b/src/authm_mad/remotes/quota/quota.rb index 9037c94510..b9b29393bb 100644 --- a/src/authm_mad/remotes/quota/quota.rb +++ b/src/authm_mad/remotes/quota/quota.rb @@ -113,7 +113,15 @@ class Quota def initialize conf = YAML.load_file(CONF_FILE) @conf=CONF.merge(conf) {|key,h1,h2| - h1.merge(h2) if h1.instance_of?(Hash) && h2.instance_of?(Hash) + if h1.instance_of?(Hash) && h2.instance_of?(Hash) + h1.merge(h2) + else + if h2 + h2 + else + h1 + end + end } @client = OpenNebula::Client.new