aboutsummaryrefslogtreecommitdiffstats
path: root/libmproxy/stateobject.py
diff options
context:
space:
mode:
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