[DRE-commits] [librarian-puppet] 29/97: Fix "undefined 'path' variable"
Stig Sandbeck Mathisen
ssm at debian.org
Tue Mar 11 12:12:48 UTC 2014
This is an automated email from the git hooks/post-receive script.
ssm pushed a commit to branch master
in repository librarian-puppet.
commit 4f13719425392a7323f95151eed124a7370afdc2
Author: William Durand <william.durand1 at gmail.com>
Date: Sat Sep 7 23:41:44 2013 +0200
Fix "undefined 'path' variable"
In file `lib/librarian/puppet/source/forge.rb`, if you end up with a `500` error in method `api_call()`, `#{path}` is not defined on line 165.
---
lib/librarian/puppet/source/forge.rb | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/lib/librarian/puppet/source/forge.rb b/lib/librarian/puppet/source/forge.rb
index e186fb5..0e40436 100644
--- a/lib/librarian/puppet/source/forge.rb
+++ b/lib/librarian/puppet/source/forge.rb
@@ -151,8 +151,10 @@ module Librarian
def api_call(module_name)
debug { "Querying Forge API for module #{name}" }
base_url = source.uri
+ path = "api/v1/releases.json?module=#{module_name}"
+
begin
- data = open("#{base_url}/api/v1/releases.json?module=#{module_name}") {|f| f.read}
+ data = open("#{base_url}/#{path}") {|f| f.read}
JSON.parse(data)
rescue OpenURI::HTTPError => e
case e.io.status[0].to_i
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ruby-extras/librarian-puppet.git
More information about the Pkg-ruby-extras-commits
mailing list