diff options
author | Ranjib Dey <ranjib@google.com> | 2013-02-06 00:21:35 -0800 |
---|---|---|
committer | Bryan McLellan <btm@opscode.com> | 2013-06-20 14:54:33 -0700 |
commit | 811246262c62cac2b1d51572e72c76ca105eb0f0 (patch) | |
tree | ed716ca549568074951dff80a47a2b98be10e8a1 | |
parent | 231d2e0d7794bc7db4eea351450e77db2b844afe (diff) | |
download | ohai-811246262c62cac2b1d51572e72c76ca105eb0f0.tar.gz |
this will be easy to mock while testing
-rw-r--r-- | lib/ohai/mixin/gce_metadata.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/ohai/mixin/gce_metadata.rb b/lib/ohai/mixin/gce_metadata.rb index 1bc13edf..2cba7f6f 100644 --- a/lib/ohai/mixin/gce_metadata.rb +++ b/lib/ohai/mixin/gce_metadata.rb @@ -57,7 +57,7 @@ module Ohai def fetch_metadata(id='') uri = "#{GCE_METADATA_URL}/#{id}" response = http_client.get(uri).response - return nil unless response.is_a?(Net::HTTPOK) + return nil unless response.code == "200" if json?(response.body) data = StringIO.new(response.body) |