diff options
author | Thomas Kriechbaumer <thomas@kriechbaumer.name> | 2015-08-10 20:44:36 +0200 |
---|---|---|
committer | Thomas Kriechbaumer <thomas@kriechbaumer.name> | 2015-08-10 20:44:36 +0200 |
commit | ff27d65f08d00c312a162965c5b1db711aa8f6ed (patch) | |
tree | 2098e479125bec21c518955907d996a88c6028f7 /netlib/utils.py | |
parent | 476badf45cd085d69b6162cd48983e3cd22cefcc (diff) | |
download | mitmproxy-ff27d65f08d00c312a162965c5b1db711aa8f6ed.tar.gz mitmproxy-ff27d65f08d00c312a162965c5b1db711aa8f6ed.tar.bz2 mitmproxy-ff27d65f08d00c312a162965c5b1db711aa8f6ed.zip |
cleanup whitespace
Diffstat (limited to 'netlib/utils.py')
-rw-r--r-- | netlib/utils.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/netlib/utils.py b/netlib/utils.py index 2dfcafc6..31dcd622 100644 --- a/netlib/utils.py +++ b/netlib/utils.py @@ -119,6 +119,7 @@ def pretty_size(size): class Data(object): + def __init__(self, name): m = __import__(name) dirname, _ = os.path.split(m.__file__) @@ -137,8 +138,6 @@ class Data(object): return fullpath - - def is_valid_port(port): if not 0 <= port <= 65535: return False @@ -221,6 +220,7 @@ def hostport(scheme, host, port): else: return "%s:%s" % (host, port) + def unparse_url(scheme, host, port, path=""): """ Returns a URL string, constructed from the specified compnents. @@ -235,6 +235,7 @@ def urlencode(s): s = [tuple(i) for i in s] return urllib.urlencode(s, False) + def urldecode(s): """ Takes a urlencoded string and returns a list of (key, value) tuples. |