From de178a5aba9af885e89ca3e3523e8bdb1fcf84bf Mon Sep 17 00:00:00 2001 From: hsoft Date: Fri, 19 Jun 2009 10:28:36 +0000 Subject: [PATCH] [#37 state:fixed] Ignore AlreadyExistsError in IPhotoLibrary. --HG-- extra : convert_revision : svn%3Ac306627e-7827-47d3-bdf0-9a457c9553a1/trunk%4086 --- pe/py/app_cocoa.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pe/py/app_cocoa.py b/pe/py/app_cocoa.py index 72716c08..37b54bbd 100644 --- a/pe/py/app_cocoa.py +++ b/pe/py/app_cocoa.py @@ -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()