1
0
镜像来自 https://github.com/arsenetar/dupeguru.git synced 2026-03-26 08:31:38 +00:00

[#48 state:fixed] Gracefully handle cases where the library doesn't exist in Add iPhoto Library.

--HG--
extra : convert_revision : svn%3Ac306627e-7827-47d3-bdf0-9a457c9553a1/trunk%40114
This commit is contained in:
hsoft
2009-09-02 14:51:05 +00:00
父節點 36f9e21184
當前提交 497a29118a

查看文件

@@ -19,7 +19,7 @@ from appscript import app, k
from hsutil import job, io from hsutil import job, io
import hsfs as fs import hsfs as fs
from hsfs import phys from hsfs import phys, InvalidPath
from hsutil import files from hsutil import files
from hsutil.str import get_file_ext from hsutil.str import get_file_ext
from hsutil.path import Path from hsutil.path import Path
@@ -94,6 +94,8 @@ class IPhotoLibrary(fs.Directory):
self.refpath = plistpath[:-1] self.refpath = plistpath[:-1]
# the AlbumData.xml file lives right in the library path # the AlbumData.xml file lives right in the library path
super(IPhotoLibrary, self).__init__(None, 'iPhoto Library') super(IPhotoLibrary, self).__init__(None, 'iPhoto Library')
if not io.exists(plistpath):
raise InvalidPath(self)
def _update_photo(self, photo_data): def _update_photo(self, photo_data):
if photo_data['MediaType'] != 'Image': if photo_data['MediaType'] != 'Image':