aboutsummaryrefslogtreecommitdiffstats
path: root/netlib/http_cookies.py
diff options
context:
space:
mode:
authorThomas Kriechbaumer <thomas@kriechbaumer.name>2015-05-27 11:18:54 +0200
committerThomas Kriechbaumer <thomas@kriechbaumer.name>2015-05-27 11:19:11 +0200
commite3d390e036430b9d7cc4b93679229fe118eb583a (patch)
tree1f10a2a59c8abef4bd24c8189d14602264b20fad /netlib/http_cookies.py
parentf7b75ba8c21c66e38da81adf3b2c573b7dae87f3 (diff)
downloadmitmproxy-e3d390e036430b9d7cc4b93679229fe118eb583a.tar.gz
mitmproxy-e3d390e036430b9d7cc4b93679229fe118eb583a.tar.bz2
mitmproxy-e3d390e036430b9d7cc4b93679229fe118eb583a.zip
cleanup code with autopep8
run the following command: $ autopep8 -i -r -a -a .
Diffstat (limited to 'netlib/http_cookies.py')
-rw-r--r--netlib/http_cookies.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/netlib/http_cookies.py b/netlib/http_cookies.py
index 8e245891..73e3f589 100644
--- a/netlib/http_cookies.py
+++ b/netlib/http_cookies.py
@@ -96,7 +96,7 @@ def _read_pairs(s, off=0, specials=()):
specials: a lower-cased list of keys that may contain commas
"""
vals = []
- while 1:
+ while True:
lhs, off = _read_token(s, off)
lhs = lhs.lstrip()
if lhs:
@@ -135,15 +135,15 @@ def _format_pairs(lst, specials=(), sep="; "):
else:
if k.lower() not in specials and _has_special(v):
v = ESCAPE.sub(r"\\\1", v)
- v = '"%s"'%v
- vals.append("%s=%s"%(k, v))
+ v = '"%s"' % v
+ vals.append("%s=%s" % (k, v))
return sep.join(vals)
def _format_set_cookie_pairs(lst):
return _format_pairs(
lst,
- specials = ("expires", "path")
+ specials=("expires", "path")
)
@@ -154,7 +154,7 @@ def _parse_set_cookie_pairs(s):
"""
pairs, off = _read_pairs(
s,
- specials = ("expires", "path")
+ specials=("expires", "path")
)
return pairs