aboutsummaryrefslogtreecommitdiffstats
path: root/mitmproxy/contentviews
diff options
context:
space:
mode:
authorSachin Kelkar <sachinkel19@gmail.com>2017-02-12 01:19:36 +0530
committerSachin Kelkar <sachinkel19@gmail.com>2017-02-12 01:19:36 +0530
commit245e24dcf3327e46b7ce2ea4a4b667c0d90bd1c0 (patch)
tree492d91e92c7900bceff15adf21f60224e3a41cdd /mitmproxy/contentviews
parentccca04b45083ecbde8a05ed709e4062024ab9f8d (diff)
downloadmitmproxy-245e24dcf3327e46b7ce2ea4a4b667c0d90bd1c0.tar.gz
mitmproxy-245e24dcf3327e46b7ce2ea4a4b667c0d90bd1c0.tar.bz2
mitmproxy-245e24dcf3327e46b7ce2ea4a4b667c0d90bd1c0.zip
Add sources of images, remove copyrighted image
Diffstat (limited to 'mitmproxy/contentviews')
-rw-r--r--mitmproxy/contentviews/image/image_parser.py4
1 files changed, 1 insertions, 3 deletions
diff --git a/mitmproxy/contentviews/image/image_parser.py b/mitmproxy/contentviews/image/image_parser.py
index bcae0566..1ff3cff7 100644
--- a/mitmproxy/contentviews/image/image_parser.py
+++ b/mitmproxy/contentviews/image/image_parser.py
@@ -73,10 +73,8 @@ def parse_jpeg(data: bytes) -> Metadata:
if segment.marker._name_ == 'com':
parts.append(('comment', str(segment.data)))
if segment.marker._name_ == 'app1':
- try:
+ if hasattr(segment.data, 'body'):
for field in segment.data.body.data.body.ifd0.fields:
if field.data is not None:
parts.append((field.tag._name_, field.data.decode('UTF-8').strip('\x00')))
- except AttributeError:
- pass
return parts