From a85e4bc75c93453f3a3e9cb2bca105d370f346a5 Mon Sep 17 00:00:00 2001 From: Colin Bendell Date: Wed, 7 Oct 2015 21:46:08 -0400 Subject: [PATCH] default should not be None Fixed default value when self.address has not been set --- libmproxy/models/connections.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libmproxy/models/connections.py b/libmproxy/models/connections.py index ab0462474..95ffbaf6d 100644 --- a/libmproxy/models/connections.py +++ b/libmproxy/models/connections.py @@ -136,7 +136,7 @@ class ServerConnection(tcp.TCPClient, stateobject.StateObject): d = super(ServerConnection, self).get_state(short) d.update( address=({"address": self.address(), - "use_ipv6": self.address.use_ipv6} if self.address else None), + "use_ipv6": self.address.use_ipv6} if self.address else {}), source_address=({"address": self.source_address(), "use_ipv6": self.source_address.use_ipv6} if self.source_address else None), cert=self.cert.to_pem() if self.cert else None