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

Harald Sitter apachelogger-guest at moszumanska.debian.org
Mon Dec 7 12:57:50 UTC 2015


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

The following commit has been merged in the master branch:
commit 672002be510c62325e7b3e16f1f33f5bf3f662dd
Author: Harald Sitter <sitter at kde.org>
Date:   Mon Dec 7 13:38:43 2015 +0100

    dry conf path handling
---
 lib/lp.rb | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/lib/lp.rb b/lib/lp.rb
index 10ad54f..0f67f45 100644
--- a/lib/lp.rb
+++ b/lib/lp.rb
@@ -58,13 +58,17 @@ module Launchpad
     }
   end
 
+  def self.conf
+    conf = "#{@conf_path}/tooling/confined/lp-tokens.json"
+    conf = "#{@conf_path}/.config/lp-tokens.json" unless File.exist?(conf)
+    conf
+  end
+
   # @!visibility private
   # @note NOT thread safe
   def self.token
     # FIXME: @token is now unused
     # FIXME: this should be moved to a method one presumes.
-    conf = "#{@conf_path}/tooling/confined/lp-tokens.json"
-    conf = "#{@conf_path}/.config/lp-tokens.json" unless File.exist?(conf)
     return nil unless File.exist?(conf)
     token_hash = JSON.parse(File.read(conf), symbolize_names: true)
 
@@ -82,8 +86,6 @@ module Launchpad
     # body while at usage it only works with flags in the header...
 
     token_hash = {}
-    conf = "#{@conf_path}/tooling/confined/lp-tokens.json"
-    conf = "#{@conf_path}/.config/lp-tokens.json" unless File.exist?(conf)
     if File.exist?(conf)
       token_hash = JSON.parse(File.read(conf), symbolize_names: true)
     else

-- 
ci-tooling packaging



More information about the pkg-kde-commits mailing list