aboutsummaryrefslogtreecommitdiffstats
path: root/libmproxy/stateobject.py
diff options
context:
space:
mode:
authorMaximilian Hils <git@maximilianhils.com>2014-01-31 04:45:39 +0100
committerMaximilian Hils <git@maximilianhils.com>2014-01-31 04:45:39 +0100
commit2db5f9de26f6ce2c90dfba86576d81fc3ce79924 (patch)
treee3b33d74f38941835bcab18a4c4bf7ac1d938456 /libmproxy/stateobject.py
parent7d96ff00efd80b11ab35f7f1c9c7dd6aff9c9032 (diff)
downloadmitmproxy-2db5f9de26f6ce2c90dfba86576d81fc3ce79924.tar.gz
mitmproxy-2db5f9de26f6ce2c90dfba86576d81fc3ce79924.tar.bz2
mitmproxy-2db5f9de26f6ce2c90dfba86576d81fc3ce79924.zip
bring failing tests back into the double-digit range
Diffstat (limited to 'libmproxy/stateobject.py')
-rw-r--r--libmproxy/stateobject.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/libmproxy/stateobject.py b/libmproxy/stateobject.py
index ef8879b8..2cbec068 100644
--- a/libmproxy/stateobject.py
+++ b/libmproxy/stateobject.py
@@ -1,4 +1,4 @@
-class StateObject:
+class StateObject(object):
def _get_state(self):
raise NotImplementedError
@@ -56,7 +56,7 @@ class SimpleStateObject(StateObject):
helper for _load_state.
loads the given attribute from the state.
"""
- if state[attr] is None:
+ if state.get(attr, None) is None:
setattr(self, attr, None)
return