Skip to content

Commit

Permalink
Merge pull request #5 from lynxman/master
Browse files Browse the repository at this point in the history
Fixes malformed url problem querying etcd
  • Loading branch information
garethr committed Aug 5, 2014
2 parents d05f9df + 1ca2c48 commit b92c42f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/hiera/backend/etcd_backend.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ def lookup(key, scope, order_override, resolution_type)

paths.each do |path|
Hiera.debug("[hiera-etcd]: Lookup #{path}/#{key} on #{@config[:host]}:#{@config[:port]}")
if "#{path}/#{key}".match("//")
Hiera.debug("[hiera-etcd]: The specified path #{path}/#{key} is malformed, skipping")
next
end
begin
result = @client.get("#{path}/#{key}")
rescue
Expand Down

0 comments on commit b92c42f

Please sign in to comment.