From f4f164e7ccfc160e30ebd881265c773888416814 Mon Sep 17 00:00:00 2001 From: ubuntudroid Date: Thu, 31 Jan 2013 22:14:53 +0100 Subject: [PATCH] More elegant setting of jira query variable --- bugwarrior/services/jira.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/bugwarrior/services/jira.py b/bugwarrior/services/jira.py index ac8282c0e..34ea03b68 100644 --- a/bugwarrior/services/jira.py +++ b/bugwarrior/services/jira.py @@ -30,10 +30,8 @@ def __init__(self, *args, **kw): super(JiraService, self).__init__(*args, **kw) self.username = self.config.get(self.target, 'jira.username') self.url = self.config.get(self.target, 'jira.base_uri') - if self.config.has_option(self.target, 'jira.query'): - self.query = self.config.get(self.target, 'jira.query') - else: - self.query = 'assignee=' + self.username + ' AND status != closed and status != resolved' + default_query = 'assignee=' + self.username + ' AND status != closed and status != resolved' + self.query = self.config.get(self.target, 'jira.query', default_query) self.jira = JIRA(options={'server': self.config.get(self.target, 'jira.base_uri')}, basic_auth=(self.username, self.config.get(self.target, 'jira.password')))