summaryrefslogtreecommitdiff
path: root/lib/gitlab_net.rb
diff options
context:
space:
mode:
authorAkzhan <akzhan.abdulin@gmail.com>2013-03-25 13:47:01 +0400
committerAkzhan <akzhan.abdulin@gmail.com>2013-03-25 13:47:01 +0400
commit6ec6fa7882995222ffebb7ec4c83c9f9812bc30a (patch)
tree9ae1de071303f524a920bb8fbd28701ce26fb06c /lib/gitlab_net.rb
parentf0eb80177b77a16ace120f9fb8d03a36924c32b5 (diff)
downloadgitlab-shell-6ec6fa7882995222ffebb7ec4c83c9f9812bc30a.tar.gz
Do not fall on discover deployment keys. Closes #25
Diffstat (limited to 'lib/gitlab_net.rb')
-rw-r--r--lib/gitlab_net.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/gitlab_net.rb b/lib/gitlab_net.rb
index 0b99706..d47209e 100644
--- a/lib/gitlab_net.rb
+++ b/lib/gitlab_net.rb
@@ -22,7 +22,7 @@ class GitlabNet
def discover(key)
key_id = key.gsub("key-", "")
resp = get("#{host}/discover?key_id=#{key_id}")
- JSON.parse(resp.body)
+ JSON.parse(resp.body) rescue nil
end
def check