[#37 state:fixed] Ignore AlreadyExistsError in IPhotoLibrary.

--HG--
extra : convert_revision : svn%3Ac306627e-7827-47d3-bdf0-9a457c9553a1/trunk%4086
This commit is contained in:
hsoft 2009-06-19 10:28:36 +00:00
parent e618a9bc55
commit de178a5aba
1 changed files with 5 additions and 1 deletions

View File

@ -103,7 +103,11 @@ class IPhotoLibrary(fs.Directory):
subdir = subdir[element]
except KeyError:
subdir = fs.Directory(subdir, element)
IPhoto(subdir, photo_path)
try:
IPhoto(subdir, photo_path)
except fs.AlreadyExistsError:
# it's possible for 2 entries in the plist to point to the same path. Ignore one of them.
pass
def update(self):
self.clear()