diff options
author | Maximilian Hils <git@maximilianhils.com> | 2016-05-31 19:25:47 -0700 |
---|---|---|
committer | Maximilian Hils <git@maximilianhils.com> | 2016-05-31 19:25:47 -0700 |
commit | 3aa8d42b053f2b2910e0eea44c1f5fd4e79a5338 (patch) | |
tree | 7b8836a2aa7d23f75f5d802bc230b4e38b9790ed | |
parent | 0a2e7a97cdfe3e786ada3db8940c7228644e958a (diff) | |
download | mitmproxy-3aa8d42b053f2b2910e0eea44c1f5fd4e79a5338.tar.gz mitmproxy-3aa8d42b053f2b2910e0eea44c1f5fd4e79a5338.tar.bz2 mitmproxy-3aa8d42b053f2b2910e0eea44c1f5fd4e79a5338.zip |
fix PIL import
-rw-r--r-- | mitmproxy/contentviews.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/mitmproxy/contentviews.py b/mitmproxy/contentviews.py index 6215fa4d..194bb3bb 100644 --- a/mitmproxy/contentviews.py +++ b/mitmproxy/contentviews.py @@ -20,12 +20,12 @@ import logging import subprocess import sys -import PIL import html2text import lxml.etree import lxml.html import six from PIL import ExifTags +from PIL import Image from six.moves import cStringIO as StringIO from mitmproxy import exceptions @@ -403,7 +403,7 @@ class ViewImage(View): def __call__(self, data, **metadata): try: - img = PIL.Image.open(StringIO(data)) + img = Image.open(StringIO(data)) except IOError: return None parts = [ |