Skip to content

Commit

Permalink
Tiny change
Browse files Browse the repository at this point in the history
  • Loading branch information
SylvainDe committed Mar 24, 2015
1 parent 0ba9e22 commit b500023
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions didyoumean/didyoumean.py
Original file line number Diff line number Diff line change
Expand Up @@ -304,10 +304,10 @@ def get_suggestions_for_exception(type_, value, frame):
IndexError: get_index_error_sugg,
KeyError: get_key_error_sugg,
}
for error_type, func in error_types.items():
if issubclass(type_, error_type):
return func(type_, value, frame)
return []
return itertools.chain.from_iterable(
func(type_, value, frame)
for error_type, func in error_types.items()
if issubclass(type_, error_type))


def add_string_to_exception(value, string):
Expand Down

0 comments on commit b500023

Please sign in to comment.