Skip to content

Commit

Permalink
KeywordBear.py: Output appropriate message
Browse files Browse the repository at this point in the history
Output appropriate message if the language
given in input is not valid/not supported
for KeywordBear

Fixes #1256
  • Loading branch information
Techievena committed Jan 7, 2017
1 parent 353bce2 commit 5b0ab35
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions bears/general/KeywordBear.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,12 @@ def _get_comments(dependency_results):
not isinstance(annotation_bear_results, list)):
return

for result in annotation_bear_results:
yield from result.contents.get('comments', [])
try:
for result in annotation_bear_results:
yield from result.contents.get('comments', [])
except AttributeError:
raise AttributeError(
'Given Language in the input is not supported by KeywordBear')


def generate_diff(comments, file, filename,
Expand Down

0 comments on commit 5b0ab35

Please sign in to comment.