Fix coverage

This commit is contained in:
Sachin Kelkar 2017-02-11 14:48:03 +05:30
parent 8eb1d34644
commit ccca04b450

View File

@ -1,7 +1,6 @@
import io
import imghdr
from PIL import ExifTags
from PIL import Image
from mitmproxy.types import multidict
@ -52,13 +51,5 @@ class ViewImage(base.View):
parts.append(
(str(i), str(img.info[i]))
)
if hasattr(img, "_getexif"):
ex = img._getexif()
if ex:
for i in sorted(ex.keys()):
tag = ExifTags.TAGS.get(i, i)
parts.append(
(str(tag), str(ex[i]))
)
fmt = base.format_dict(multidict.MultiDict(parts))
return "%s image" % img.format, fmt