From d39e3b9673027bb9f4d1542e5a2386f73078eec0 Mon Sep 17 00:00:00 2001
From: Patrick Wendell <pwendell@gmail.com>
Date: Sat, 19 Jul 2014 18:24:21 -0700
Subject: [PATCH] SPARK-2596 HOTFIX: Deal with non-existent JIRAs.

A small bug that was found in our JIRA sync script.
---
 dev/github_jira_sync.py | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/dev/github_jira_sync.py b/dev/github_jira_sync.py
index 4b0e266bbe..8051080117 100755
--- a/dev/github_jira_sync.py
+++ b/dev/github_jira_sync.py
@@ -116,8 +116,13 @@ for issue, pr in sorted(jira_prs, key=lambda (k, v): int(v['number'])):
 
     url = pr['html_url']
     title = "[Github] Pull Request #%s (%s)" % (pr['number'], pr['user']['login']) 
-  
-    existing_links = map(lambda l: l.raw['object']['url'], jira_client.remote_links(issue))
+    try:
+      existing_links = map(lambda l: l.raw['object']['url'], jira_client.remote_links(issue))
+    except:
+      print "Failure reading JIRA %s (does it exist?)" % issue
+      print sys.exc_info()[0]
+      continue
+
     if url in existing_links:
         continue
 
-- 
GitLab