mirror of
https://github.com/arsenetar/dupeguru.git
synced 2025-03-10 05:34:36 +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:
parent
36f9e21184
commit
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':
|
||||||
|
Loading…
x
Reference in New Issue
Block a user