Skip to content

Commit

Permalink
remove impossible condition
Browse files Browse the repository at this point in the history
  • Loading branch information
dtkav committed Aug 23, 2018
1 parent 0589fb0 commit a514e56
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions connexion/operations/swagger2.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,10 +160,7 @@ def example_response(self, code=None, *args, **kwargs):
Returns example response from spec
"""
# simply use the first/lowest status code, this is probably 200 or 201
try:
code = code or sorted(self._responses.keys())[0]
except IndexError:
code = 200
code = code or sorted(self._responses.keys())[0]
examples_path = [str(code), 'examples']
schema_example_path = [str(code), 'schema', 'example']
try:
Expand Down

0 comments on commit a514e56

Please sign in to comment.