From d9c6be3d131fa01f70779307b688560f1ace0751 Mon Sep 17 00:00:00 2001 From: Aldo Cortesi Date: Sat, 19 Feb 2011 17:03:44 +1300 Subject: Fix serialization when a Request has no associated client connection. --- libmproxy/proxy.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'libmproxy/proxy.py') diff --git a/libmproxy/proxy.py b/libmproxy/proxy.py index 1c4d4d71..88c62b25 100644 --- a/libmproxy/proxy.py +++ b/libmproxy/proxy.py @@ -150,7 +150,7 @@ class Request(controller.Msg): def get_state(self): return dict( - client_conn = self.client_conn.get_state(), + client_conn = self.client_conn.get_state() if self.client_conn else None, host = self.host, port = self.port, scheme = self.scheme, @@ -164,7 +164,7 @@ class Request(controller.Msg): @classmethod def from_state(klass, state): return klass( - ClientConnect.from_state(state["client_conn"]), + ClientConnect.from_state(state["client_conn"]) if state["client_conn"] else None, state["host"], state["port"], state["scheme"], -- cgit v1.2.3