File tree Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -573,6 +573,8 @@ def from_bytes(klass, bytestring):
573573 bstring : bytes
574574 Byte string containing the on-disk representation of an image
575575 """
576+ if len (klass .files_types ) > 1 :
577+ raise NotImplementedError ("from_bytes is undefined for multi-file images" )
576578 bio = io .BytesIO (bytestring )
577579 file_map = klass .make_file_map ({'image' : bio , 'header' : bio })
578580 return klass .from_file_map (file_map )
@@ -590,6 +592,8 @@ def to_bytes(self):
590592 bytes
591593 Serialized image
592594 """
595+ if len (self .__class__ .files_types ) > 1 :
596+ raise NotImplementedError ("to_bytes() is undefined for multi-file images" )
593597 bio = io .BytesIO ()
594598 file_map = self .make_file_map ({'image' : bio , 'header' : bio })
595599 self .to_file_map (file_map )
You can’t perform that action at this time.
0 commit comments