Skip to content

Commit

Permalink
#21 Don't pop stuff that's going to be needed after
Browse files Browse the repository at this point in the history
  • Loading branch information
jmcs committed Jun 22, 2015
1 parent e17d0a1 commit 9fe3330
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions connexion/operation.py
Expand Up @@ -88,12 +88,12 @@ def __content_type_decorator(self) -> types.FunctionType:
logger.debug('... Produces: %s', produces)

if produces_json(produces): # endpoint will return json
mimetype = produces.pop()
mimetype = produces[0]
logger.debug('... Produces json')
jsonify = Jsonifier(mimetype)
return jsonify
elif len(produces) == 1:
mimetype = produces.pop()
mimetype = produces[0]
logger.debug('... Produces {}'.format(mimetype))
decorator = Produces(mimetype)
return decorator
Expand Down Expand Up @@ -129,7 +129,7 @@ def __security_decorator(self) -> types.FunctionType:
logger.warning("... More than security requirement defined. **IGNORING SECURITY REQUIREMENTS**")
return security_passthrough

security = security.pop() # type: dict
security = security[0] # type: dict
# the following line gets the first (and because of the previous condition only) scheme and scopes
# from the operation's security requirements

Expand Down

0 comments on commit 9fe3330

Please sign in to comment.