diff options
author | Aldo Cortesi <aldo@nullcube.com> | 2011-08-02 16:52:47 +1200 |
---|---|---|
committer | Aldo Cortesi <aldo@nullcube.com> | 2011-08-02 16:52:47 +1200 |
commit | 1ff6a767d001a8c0f45a190e26be363ea9410534 (patch) | |
tree | ca511b918637e306140be6318dab05037ed4beda /libmproxy/utils.py | |
parent | 357502fe03a5f86c1c29d35c5d607541df157640 (diff) | |
download | mitmproxy-1ff6a767d001a8c0f45a190e26be363ea9410534.tar.gz mitmproxy-1ff6a767d001a8c0f45a190e26be363ea9410534.tar.bz2 mitmproxy-1ff6a767d001a8c0f45a190e26be363ea9410534.zip |
Unit test++
Diffstat (limited to 'libmproxy/utils.py')
-rw-r--r-- | libmproxy/utils.py | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/libmproxy/utils.py b/libmproxy/utils.py index 677d3b22..ff56aa13 100644 --- a/libmproxy/utils.py +++ b/libmproxy/utils.py @@ -145,11 +145,10 @@ def hexdump(s): return parts -def try_del(dict, key): - try: - del dict[key] - except KeyError: - pass +def del_all(dict, keys): + for key in keys: + if key in dict: + del dict[key] class Headers: |