Skip to content

Commit

Permalink
not x in -> x not in
Browse files Browse the repository at this point in the history
  • Loading branch information
mozillazg committed Jan 8, 2016
1 parent 5433f79 commit 82bbde7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions httpbin/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -288,13 +288,13 @@ def generate_stream():
def view_status_code(codes):
"""Return status code or random status code if more than one are given"""

if not ',' in codes:
if ',' not in codes:
code = int(codes)
return status_code(code)

choices = []
for choice in codes.split(','):
if not ':' in choice:
if ':' not in choice:
code = choice
weight = 1
else:
Expand Down Expand Up @@ -412,7 +412,7 @@ def digest_auth(qop=None, user='user', passwd='passwd'):
qop = None
if 'Authorization' not in request.headers or \
not check_digest_auth(user, passwd) or \
not 'Cookie' in request.headers:
'Cookie' not in request.headers:
response = app.make_response('')
response.status_code = 401

Expand Down

0 comments on commit 82bbde7

Please sign in to comment.