aboutsummaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorMaximilian Hils <git@maximilianhils.com>2016-03-20 19:56:22 +0100
committerMaximilian Hils <git@maximilianhils.com>2016-03-20 19:56:22 +0100
commit6f902ffbb3067350da3da01d923e4351d63f604a (patch)
treefbcb2c6e4db5f487448df80267a7bff3bb5c55f4 /examples
parent88d365cfe671bc5c8d96e78334337aa84cc815da (diff)
downloadmitmproxy-6f902ffbb3067350da3da01d923e4351d63f604a.tar.gz
mitmproxy-6f902ffbb3067350da3da01d923e4351d63f604a.tar.bz2
mitmproxy-6f902ffbb3067350da3da01d923e4351d63f604a.zip
py3++: iteritems
Diffstat (limited to 'examples')
-rw-r--r--examples/har_extractor.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/examples/har_extractor.py b/examples/har_extractor.py
index 25661f7c..15e1ef30 100644
--- a/examples/har_extractor.py
+++ b/examples/har_extractor.py
@@ -2,6 +2,7 @@
This inline script utilizes harparser.HAR from
https://github.com/JustusW/harparser to generate a HAR log object.
"""
+import six
from harparser import HAR
from datetime import datetime
@@ -111,7 +112,7 @@ def response(context, flow):
# HAR timings are integers in ms, so we have to re-encode the raw timings to
# that format.
- timings = dict([(k, int(1000 * v)) for k, v in timings_raw.iteritems()])
+ timings = dict([(k, int(1000 * v)) for k, v in six.iteritems(timings_raw)])
# The full_time is the sum of all timings.
# Timings set to -1 will be ignored as per spec.