Skip to content

Commit

Permalink
More elegant setting of jira query variable
Browse files Browse the repository at this point in the history
  • Loading branch information
ubuntudroid committed Jan 31, 2013
1 parent 64e18b7 commit f4f164e
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions bugwarrior/services/jira.py
Original file line number Diff line number Diff line change
Expand Up @@ -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')))
Expand Down

0 comments on commit f4f164e

Please sign in to comment.