diff options
author | PrajaktaPurohit <prajakta@opscode.com> | 2012-12-11 17:21:28 -0800 |
---|---|---|
committer | Lamont Granquist <lamont@opscode.com> | 2012-12-19 15:56:12 -0800 |
commit | 95cefeed2f69fa79c0cd05d0683289a1e48f9b1e (patch) | |
tree | 1fb8e9f3ed058cd2d43180855450b42b14fc3bff /lib/chef/win32/registry.rb | |
parent | b15ad11e243ff3d3aae60fa4dab8cd6a2268de28 (diff) | |
download | chef-95cefeed2f69fa79c0cd05d0683289a1e48f9b1e.tar.gz |
Fixing code to not continue if hive not found
Diffstat (limited to 'lib/chef/win32/registry.rb')
-rw-r--r-- | lib/chef/win32/registry.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/chef/win32/registry.rb b/lib/chef/win32/registry.rb index 4d369b6070..03d34040a9 100644 --- a/lib/chef/win32/registry.rb +++ b/lib/chef/win32/registry.rb @@ -77,6 +77,7 @@ class Chef begin hive, key = get_hive_and_key(key_path) rescue Chef::Exceptions::Win32RegKeyMissing + return true end hive.open(key, ::Win32::Registry::KEY_SET_VALUE | registry_system_architecture) do |reg| reg.delete_value(value[:name]) @@ -198,8 +199,8 @@ class Chef end def data_exists?(key_path, value) - hive, key = get_hive_and_key(key_path) key_exists!(key_path) + hive, key = get_hive_and_key(key_path) hive.open(key, ::Win32::Registry::KEY_READ | registry_system_architecture) do |reg| reg.each do |val_name, val_type, val_data| if val_name == value[:name] && |