aboutsummaryrefslogtreecommitdiffstats
path: root/examples/har_dump.py
diff options
context:
space:
mode:
authorAldo Cortesi <aldo@nullcube.com>2016-11-04 10:54:04 +1300
committerAldo Cortesi <aldo@nullcube.com>2016-11-04 10:59:41 +1300
commit4eb2b56dec09bf3e7322e402ad5ba46523309138 (patch)
treedc506686e58750b9a6e394fbc78473d9e9792d22 /examples/har_dump.py
parent6c8c4465d9971076e9a04f8042aebd5d71f67d59 (diff)
downloadmitmproxy-4eb2b56dec09bf3e7322e402ad5ba46523309138.tar.gz
mitmproxy-4eb2b56dec09bf3e7322e402ad5ba46523309138.tar.bz2
mitmproxy-4eb2b56dec09bf3e7322e402ad5ba46523309138.zip
Let's not over-ride __bool__ on connection objects
If I had a thousand years and every thesaurus in the world, I still couldn't adequately express how much I dislike this piece of interface design.
Diffstat (limited to 'examples/har_dump.py')
-rw-r--r--examples/har_dump.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/har_dump.py b/examples/har_dump.py
index ab7bf1e1..aeb154d2 100644
--- a/examples/har_dump.py
+++ b/examples/har_dump.py
@@ -145,7 +145,7 @@ def response(flow):
"params": params
}
- if flow.server_conn:
+ if flow.server_conn.connected():
entry["serverIPAddress"] = str(flow.server_conn.ip_address.address[0])
HAR["log"]["entries"].append(entry)