mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-12-29 11:26:17 +03:00
Keep case consistency in error messages
Co-authored-by: Andrew Murray <3112309+radarhere@users.noreply.github.com>
This commit is contained in:
parent
8ad5172e88
commit
9c2cbcf452
|
@ -157,7 +157,7 @@ def _save(im, fp, filename):
|
||||||
elif im.mode == "RGBA":
|
elif im.mode == "RGBA":
|
||||||
rawmode, head = "RGB", b"P6"
|
rawmode, head = "RGB", b"P6"
|
||||||
else:
|
else:
|
||||||
raise OSError(f"Cannot write mode {im.mode} as PPM")
|
raise OSError(f"cannot write mode {im.mode} as PPM")
|
||||||
fp.write(head + ("\n%d %d\n" % im.size).encode("ascii"))
|
fp.write(head + ("\n%d %d\n" % im.size).encode("ascii"))
|
||||||
if head == b"P6":
|
if head == b"P6":
|
||||||
fp.write(b"255\n")
|
fp.write(b"255\n")
|
||||||
|
|
Loading…
Reference in New Issue
Block a user