Skip to content

Commit

Permalink
gitlab: return {} for API failures
Browse files Browse the repository at this point in the history
These methods do not usually return lists.
  • Loading branch information
mathstuf committed Aug 3, 2016
1 parent a68d11a commit 9486d7d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions bugwarrior/services/gitlab.py
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,7 @@ def get_repo_issues(self, rid):
repo_issues = self._fetch_paged(tmpl)
except:
# Projects may have issues disabled.
return []
return {}
for issue in repo_issues:
if issue['state'] not in ('opened', 'reopened'):
continue
Expand All @@ -350,7 +350,7 @@ def get_repo_merge_requests(self, rid):
repo_merge_requests = self._fetch_paged(tmpl)
except:
# Projects may have merge requests disabled.
return []
return {}
for issue in repo_merge_requests:
if issue['state'] not in ('opened', 'reopened'):
continue
Expand Down

0 comments on commit 9486d7d

Please sign in to comment.