Skip to content

Commit

Permalink
m
Browse files Browse the repository at this point in the history
  • Loading branch information
hMatoba committed May 14, 2015
1 parent 3c13be5 commit 75a25e5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions piexif/_load.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ def get_ifd_dict(self, pointer, ifd_name, read_unknown=False):
)[0]
value = self.tiftag[pointer+8: pointer+12]
p_and_value.append((pointer, value_type, value_num, value))
v_set = (value_type, value_num, value)
v_set = (value_type, value_num, value, tag)
if tag in TAGS[t]:
ifd_dict[tag] = self.convert_value(v_set)
elif read_unknown:
Expand Down Expand Up @@ -205,7 +205,8 @@ def convert_value(self, val):
)[0])
else:
raise ValueError("Exif might be wrong. Got incorrect value " +
"type to decode.")
"type to decode.\n" +
"tag: " + str(val[3]) + "\ntype: " + str(t))

if isinstance(data, tuple) and (len(data) == 1):
return data[0]
Expand Down
2 changes: 1 addition & 1 deletion tests/s_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -572,7 +572,7 @@ def test_ExifReader_return_unknown(self):
def test_ExifReader_convert_value_fail(self):
er = piexif._load._ExifReader(I1)
with self.assertRaises(ValueError):
er.convert_value((None, None, None))
er.convert_value((None, None, None, None))

def test_split_into_segments_fail1(self):
with self.assertRaises(ValueError):
Expand Down

0 comments on commit 75a25e5

Please sign in to comment.