From 7f13a5d7a914143f5b6d140669a32ca84d538f2c Mon Sep 17 00:00:00 2001 From: Frederic Massart Date: Thu, 3 Apr 2014 00:48:51 +0800 Subject: [PATCH] New Exception type for issues not found on tracker --- lib/jira.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/jira.py b/lib/jira.py index 1fddaad..177a637 100644 --- a/lib/jira.py +++ b/lib/jira.py @@ -130,7 +130,7 @@ class Jira(object): resp = self.request('issue/%s' % (str(key)), params=querystring) if resp['status'] == 404: - raise JiraException('Issue could not be found.') + raise JiraIssueNotFoundException('Issue could not be found.') elif not resp['status'] == 200: raise JiraException('The tracker is not available.') @@ -353,5 +353,10 @@ class Jira(object): return True + class JiraException(Exception): pass + + +class JiraIssueNotFoundException(JiraException): + pass -- 2.11.0