mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-02-12 17:40:51 +03:00
added exceptions to pass tests
This commit is contained in:
parent
a18bb13f07
commit
7585c21901
|
@ -177,7 +177,10 @@ class CurImageFile(IcoImagePlugin.IcoImageFile):
|
|||
self.ico = CurFile(self.fp)
|
||||
self.info["sizes"] = self.ico.sizes()
|
||||
self.info["hotspots"] = self.ico.hotspots()
|
||||
self.size = self.ico.entry[0]["dim"]
|
||||
if len(self.ico.entry) > 0:
|
||||
self.size = self.ico.entry[0]["dim"]
|
||||
else:
|
||||
raise TypeError("No cursors were found")
|
||||
self.load()
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user