If reset is called in the state change, this reset will be called
the first time when the cover objects don't have any value in the vars.
def reset (self):
cached_image = self._url
- if os.path.exists (cached_image):
+ if cached_image and os.path.exists (cached_image):
os.remove (cached_image)
cached_thumb = self._thumb
- if os.path.exists (cached_thumb):
+ if cached_thumb and os.path.exists (cached_thumb):
os.remove (cached_thumb)
self.url = self._initial_image