aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mitmproxy/stateobject.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/mitmproxy/stateobject.py b/mitmproxy/stateobject.py
index 4074fbbf..5e4ae6e3 100644
--- a/mitmproxy/stateobject.py
+++ b/mitmproxy/stateobject.py
@@ -53,7 +53,7 @@ class StateObject(netlib.basetypes.Serializable):
state = state.copy()
for attr, cls in six.iteritems(self._stateobject_attributes):
val = state.pop(attr)
- if state.get(attr) is None:
+ if val is None:
setattr(self, attr, val)
else:
curr = getattr(self, attr)