1
0
spogulis no https://github.com/arsenetar/dupeguru.git synced 2025-07-03 22:13:20 +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
Šī revīzija ir iekļauta:
hsoft 2009-09-02 14:51:05 +00:00
vecāks 36f9e21184
revīzija 497a29118a

Parādīt failu

@ -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':