Explorar o código

fix: exception message format

Mikael Koli %!s(int64=4) %!d(string=hai) anos
pai
achega
4f11cc167f
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      redmail/email/body.py

+ 1 - 1
redmail/email/body.py

@@ -194,7 +194,7 @@ class HTMLBody(Body):
                 required_keys = ("content", "maintype", "subtype")
                 if any(key not in img for key in required_keys):
                     missing_keys = tuple(key for key in required_keys if key not in img)
-                    raise KeyError(f"Image {img:!r} missing keys: {missing_keys:!r}")
+                    raise KeyError(f"Image {repr(img)} missing keys: {missing_keys}")
                 img_content = img["content"]
                 maintype = "image"
                 subtype = "png"