[SCM] ci-tooling packaging branch, master, updated. caa217bc1f04a18467d31e4c12f20800d8c134f1

Harald Sitter apachelogger-guest at moszumanska.debian.org
Fri Nov 28 13:36:27 UTC 2014


Gitweb-URL: http://git.debian.org/?p=pkg-kde/ci-tooling.git;a=commitdiff;h=caa217b

The following commit has been merged in the master branch:
commit caa217bc1f04a18467d31e4c12f20800d8c134f1
Author: Harald Sitter <sitter at kde.org>
Date:   Fri Nov 28 14:36:24 2014 +0100

    don't try to access entries on rubbers that don't have the this property
---
 lib/lp.rb | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/lib/lp.rb b/lib/lp.rb
index f41ccae..444b15f 100644
--- a/lib/lp.rb
+++ b/lib/lp.rb
@@ -101,7 +101,11 @@ module Launchpad
                 uri.query = URI.encode_www_form(params)
                 loop do
                     obj = Rubber::from_json(Net::HTTP.get(uri))
-                    ret += obj.entries
+                    if obj['entries']
+                        ret += obj.entries
+                    else
+                        return obj
+                    end
                     return ret unless obj['next_collection_link']
                     uri = URI(obj.next_collection_link)
                 end
@@ -114,8 +118,8 @@ module Launchpad
 
         def self.from_url(url)
             uri = URI(url)
-            data = Launchpad::token.get(uri.path)
-            return Rubber::from_json(data)
+            reply = Launchpad::token.get(uri.path)
+            return Rubber::from_json(reply.body)
         end
     end
 end

-- 
ci-tooling packaging



More information about the pkg-kde-commits mailing list