Fix Error when cleaning image behind us #665

This commit is contained in:
Julien Duponchelle committed 2016-09-02 11:46:08 +02:00
1 parent be0fee99e7
commit 43afce740d
2 files changed
+7 -2

No files matched your search

+4 -1
View File
@@ -512,7 +512,10 @@ class Project:
try:
pictures = set(os.listdir(self.pictures_directory))
for drawing in self._drawings.values():
pictures.remove(drawing.ressource_filename)
try:
pictures.remove(drawing.ressource_filename)
except KeyError:
pass
for pict in pictures:
os.remove(os.path.join(self.pictures_directory, pict))