Skip to content
This repository has been archived by the owner on Oct 27, 2021. It is now read-only.

Commit

Permalink
Merge pull request python-pillow#2340 from radarhere/import
Browse files Browse the repository at this point in the history
Remove unnecessary import
  • Loading branch information
hugovk authored Jan 8, 2017
2 parents 39811f0 + 1fb0097 commit 51532c2
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
3 changes: 1 addition & 2 deletions PIL/JpegImagePlugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@
import struct
import io
import warnings
from struct import unpack_from
from PIL import Image, ImageFile, TiffImagePlugin, _binary
from PIL.JpegPresets import presets
from PIL._util import isStringType
Expand Down Expand Up @@ -493,7 +492,7 @@ def _getmp(self):
try:
rawmpentries = mp[0xB002]
for entrynum in range(0, quant):
unpackedentry = unpack_from(
unpackedentry = struct.unpack_from(
'{}LLLHH'.format(endianness), rawmpentries, entrynum * 16)
labels = ('Attribute', 'Size', 'DataOffset', 'EntryNo1',
'EntryNo2')
Expand Down
1 change: 0 additions & 1 deletion PIL/_binary.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ def o8(i):


# Input, le = little endian, be = big endian
# TODO: replace with more readable struct.unpack equivalent
def i16le(c, o=0):
"""
Converts a 2-bytes (16 bits) string to an unsigned integer.
Expand Down

0 comments on commit 51532c2

Please sign in to comment.