diff options
author | Aldo Cortesi <aldo@nullcube.com> | 2014-02-07 10:50:23 +1300 |
---|---|---|
committer | Aldo Cortesi <aldo@nullcube.com> | 2014-02-07 10:50:23 +1300 |
commit | 3d52d16e8d7b298363ef6d6f7279d75fb4b1a430 (patch) | |
tree | 5b793cc821b531a3fcedf511b9315346f6c7e014 /netlib/odict.py | |
parent | 404d4bbc69d9f2eb12664415ebca44a95ce96e56 (diff) | |
parent | 7fc544bc7ff8fd610ba9db92c0d3b59a0b040b5b (diff) | |
download | mitmproxy-3d52d16e8d7b298363ef6d6f7279d75fb4b1a430.tar.gz mitmproxy-3d52d16e8d7b298363ef6d6f7279d75fb4b1a430.tar.bz2 mitmproxy-3d52d16e8d7b298363ef6d6f7279d75fb4b1a430.zip |
Merge branch 'tcp_proxy'
Diffstat (limited to 'netlib/odict.py')
-rw-r--r-- | netlib/odict.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/netlib/odict.py b/netlib/odict.py index 0759a5bf..46b74e8e 100644 --- a/netlib/odict.py +++ b/netlib/odict.py @@ -1,5 +1,6 @@ import re, copy + def safe_subn(pattern, repl, target, *args, **kwargs): """ There are Unicode conversion problems with re.subn. We try to smooth @@ -98,6 +99,9 @@ class ODict: def _get_state(self): return [tuple(i) for i in self.lst] + def _load_state(self, state): + self.list = [list(i) for i in state] + @classmethod def _from_state(klass, state): return klass([list(i) for i in state]) |