Commits

Mikhail Korobov committed 32c8930

NotImplementedError -> FormatNotSupported

Comments (0)

Files changed (1)

 
 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'])