You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kibble.apache.org by hu...@apache.org on 2017/10/24 17:49:03 UTC

[kibble-scanners] branch master updated: catch connection aborts

This is an automated email from the ASF dual-hosted git repository.

humbedooh pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/kibble-scanners.git


The following commit(s) were added to refs/heads/master by this push:
     new 530e647  catch connection aborts
530e647 is described below

commit 530e647a20fc686772a8d5cb77b9c26fd882ef09
Author: Daniel Gruno <hu...@apache.org>
AuthorDate: Tue Oct 24 19:48:33 2017 +0200

    catch connection aborts
---
 src/plugins/scanners/jira.py | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/src/plugins/scanners/jira.py b/src/plugins/scanners/jira.py
index 7b32d4d..726151a 100644
--- a/src/plugins/scanners/jira.py
+++ b/src/plugins/scanners/jira.py
@@ -131,9 +131,13 @@ def scanTicket(KibbleBit, key, u, source, creds, openTickets):
         KibbleBit.pprint("[%s] Parsing data from JIRA..." % key)
         queryURL = "%s/rest/api/2/issue/%s?fields=creator,reporter,status,issuetype,summary,assignee,resolutiondate,created,priority,changelog,comment,resolution,votes&expand=changelog" % (u, key)
         jiraURL = "%s/browse/%s" % (u, key)
-        tjson = plugins.utils.jsonapi.get(queryURL, auth = creds)
-        if not tjson:
-            KibbleBit.pprint("%s does not exist (404'ed)" % key)
+        try:
+            tjson = plugins.utils.jsonapi.get(queryURL, auth = creds)
+            if not tjson:
+                KibbleBit.pprint("%s does not exist (404'ed)" % key)
+                return False
+        except requests.exceptions.ConnectionError as err:
+            KibbleBit.pprint("Connection error, skipping this ticket for now!")
             return False
         st, closer = wasclosed(tjson)
         if st and not closer:

-- 
To stop receiving notification emails like this one, please contact
['"commits@kibble.apache.org" <co...@kibble.apache.org>'].