[bts-link] 01/01: Only initialize Jira SOAP proxy when actually needed and not at bugtracker declaration

Olivier Berger obergix at moszumanska.debian.org
Tue Dec 8 10:57:17 UTC 2015


This is an automated email from the git hooks/post-receive script.

obergix pushed a commit to branch obergix-master
in repository bts-link.

commit 81c398ebabdc4b27ae94ef3b03ec76bd1542c6f7
Author: Olivier Berger <olivier.berger at telecom-sudparis.eu>
Date:   Tue Dec 8 11:57:05 2015 +0100

    Only initialize Jira SOAP proxy when actually needed and not at bugtracker declaration
---
 remote/jira.py | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/remote/jira.py b/remote/jira.py
index 008046f..0c8f449 100644
--- a/remote/jira.py
+++ b/remote/jira.py
@@ -21,6 +21,7 @@ from base import die
 
 class JIRAData:
     def __init__(self, bts, id):
+        bts.initSoap()
         issue = bts.soap.getIssue(bts.auth, id)
 
         self.id = id or failwith(uri, 'JIRA: no id')
@@ -38,7 +39,11 @@ class RemoteJIRA(RemoteBts):
         urifmt = '%(uri)s/browse/%(id)s'
         RemoteBts.__init__(self, cnf, bugre, urifmt, JIRAData)
 
-        uri = cnf['uri']
+    def initSoap(self):
+        if hasattr(self, 'soap'):
+            return
+        
+        uri = self._cnf['uri']
         wsdl = uri + '/rpc/soap/jirasoapservice-v2?wsdl'
         try:
             self.soap = SOAPpy.WSDL.Proxy(wsdl)

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/bts-link/bts-link.git



More information about the bts-link-commits mailing list