forked from josch/img2pdf
cater for python-pil versions without close() attribute (the 3rd fix)
This commit is contained in:
parent
b90e385efe
commit
d5fc324b7b
1 changed files with 5 additions and 1 deletions
|
@ -87,7 +87,11 @@ def test_suite():
|
||||||
elif orig_img.mode not in ("RGB", "L", "CMYK", "CMYK;I"):
|
elif orig_img.mode not in ("RGB", "L", "CMYK", "CMYK;I"):
|
||||||
orig_img = orig_img.convert("RGB")
|
orig_img = orig_img.convert("RGB")
|
||||||
self.assertEqual(im.tobytes(), orig_img.tobytes())
|
self.assertEqual(im.tobytes(), orig_img.tobytes())
|
||||||
|
# the python-pil version 2.3.0-1ubuntu3 in Ubuntu does not have the close() method
|
||||||
|
try:
|
||||||
im.close()
|
im.close()
|
||||||
|
except AttributeError:
|
||||||
|
pass
|
||||||
# lastly, make sure that the generated pdf matches bit by bit the
|
# lastly, make sure that the generated pdf matches bit by bit the
|
||||||
# expected pdf
|
# expected pdf
|
||||||
with open(out, "rb") as outf:
|
with open(out, "rb") as outf:
|
||||||
|
|
Loading…
Reference in a new issue