diff --git a/bugwarrior/services/bitbucket.py b/bugwarrior/services/bitbucket.py index 2e7031d3d..3ab8fd314 100644 --- a/bugwarrior/services/bitbucket.py +++ b/bugwarrior/services/bitbucket.py @@ -6,6 +6,7 @@ import datetime import requests + class BitbucketService(IssueService): base_api = 'https://api.bitbucket.org/1.0' base_url = 'http://bitbucket.org/' @@ -28,7 +29,7 @@ def __init__(self, *args, **kw): username = self.config.get(self.target, 'username') service = "bitbucket://%s@bitbucket.org/%s" % (login, username) password = get_service_password(service, login, oracle=password, - interactive=self.config.interactive) + interactive=self.config.interactive) self.auth = (login, password) @@ -50,7 +51,7 @@ def pull(self, tag): def annotations(self, tag, issue): url = self.base_api + '/repositories/%s/issues/%i/comments' % ( tag, issue['local_id']) - response = _getter(url, auth = self.auth) + response = _getter(url, auth=self.auth) _parse = lambda s: datetime.datetime.strptime(s[:10], "%Y-%m-%d") return dict([ self.format_annotation( @@ -101,6 +102,7 @@ def issues(self): **self.annotations(tag, issue) ) for tag, issue in issues] + def _getter(url, auth): response = requests.get(url, auth=auth)