Skip to content

Commit

Permalink
minor pylint fix
Browse files Browse the repository at this point in the history
  • Loading branch information
AleksMat committed Feb 14, 2018
1 parent 8740910 commit f3d85fa
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions sentinelhub/io_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,8 @@ def read_jp2_image(filename):
# return glymur.Jp2k(filename)[:]
image = cv2.imread(filename, cv2.IMREAD_UNCHANGED)

with open(filename, 'rb') as f:
bit_depth = get_jp2_bit_depth(f)
with open(filename, 'rb') as file:
bit_depth = get_jp2_bit_depth(file)

return _fix_jp2_image(image, bit_depth)

Expand Down Expand Up @@ -327,7 +327,7 @@ def get_jp2_bit_depth(stream):
if len(read_buffer) < 8:
raise ValueError('Image Header Box not found in Jpeg2000 file')

box_length, box_id = struct.unpack('>I4s', read_buffer)
_, box_id = struct.unpack('>I4s', read_buffer)

if box_id == b'ihdr':
read_buffer = stream.read(14)
Expand Down

0 comments on commit f3d85fa

Please sign in to comment.