Commits

Mikhail Korobov committed 32c8930

NotImplementedError -> FormatNotSupported

  • Participants
  • Parent commits f149af5

Comments (0)

Files changed (1)

File pymaging_psd.py

 
 import psd_tools
 from pymaging.formats import Format
+from pymaging.exceptions import FormatNotSupported
 
 def decode(fileobj):
     psd = psd_tools.PSDImage.from_stream(fileobj)
     return psd.as_pymaging()
 
 def encode(image, fileobj):
-    raise NotImplementedError("Saving to PSD is not supported")
+    raise FormatNotSupported('psd')
 
 PSD = Format(decode, encode, ['psd'])