remove also images from cache that could not be loaded
git-svn-id: http://www.neo1973-germany.de/svn@25 46df4e5c-bc4e-4628-a0fc-830ba316316d
This commit is contained in:
parent
dbde5c2376
commit
e735565824
1 changed files with 6 additions and 4 deletions
|
@ -208,7 +208,7 @@ class Pylgrim(edje.Edje):
|
||||||
localFile.close()
|
localFile.close()
|
||||||
except Exception, e:
|
except Exception, e:
|
||||||
print 'download error', e
|
print 'download error', e
|
||||||
if not os.path.exists(filename):
|
if os.path.exists(filename):
|
||||||
os.unlink(filename)
|
os.unlink(filename)
|
||||||
|
|
||||||
def position(self, content):
|
def position(self, content):
|
||||||
|
@ -296,6 +296,8 @@ class Pylgrim(edje.Edje):
|
||||||
self.icons[(2*self.border_y+1)*i+j].file_set(filename)
|
self.icons[(2*self.border_y+1)*i+j].file_set(filename)
|
||||||
except Exception, e:
|
except Exception, e:
|
||||||
print e
|
print e
|
||||||
|
if os.path.exists(filename):
|
||||||
|
os.unlink(filename)
|
||||||
self.icons[(2*self.border_y+1)*i+j].file_set("404.png")
|
self.icons[(2*self.border_y+1)*i+j].file_set("404.png")
|
||||||
self.icons[(2*self.border_y+1)*i+j].set_position((i-self.border_x)*256+self.size[0]/2-self.offset_x,(j-self.border_y)*256+self.size[1]/2-self.offset_y)
|
self.icons[(2*self.border_y+1)*i+j].set_position((i-self.border_x)*256+self.size[0]/2-self.offset_x,(j-self.border_y)*256+self.size[1]/2-self.offset_y)
|
||||||
self.icons[(2*self.border_y+1)*i+j].size = 256,256
|
self.icons[(2*self.border_y+1)*i+j].size = 256,256
|
||||||
|
|
Loading…
Reference in a new issue