Keep case consistency in error messages

Co-authored-by: Andrew Murray <3112309+radarhere@users.noreply.github.com>
This commit is contained in:
Piolie 2021-03-22 13:06:16 -03:00 committed by GitHub
parent 8ad5172e88
commit 9c2cbcf452
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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")