mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2024-11-26 18:18:25 +00:00
Fix coverage
This commit is contained in:
parent
8eb1d34644
commit
ccca04b450
@ -1,7 +1,6 @@
|
|||||||
import io
|
import io
|
||||||
import imghdr
|
import imghdr
|
||||||
|
|
||||||
from PIL import ExifTags
|
|
||||||
from PIL import Image
|
from PIL import Image
|
||||||
|
|
||||||
from mitmproxy.types import multidict
|
from mitmproxy.types import multidict
|
||||||
@ -52,13 +51,5 @@ class ViewImage(base.View):
|
|||||||
parts.append(
|
parts.append(
|
||||||
(str(i), str(img.info[i]))
|
(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))
|
fmt = base.format_dict(multidict.MultiDict(parts))
|
||||||
return "%s image" % img.format, fmt
|
return "%s image" % img.format, fmt
|
||||||
|
Loading…
Reference in New Issue
Block a user