mirror of
https://github.com/arsenetar/dupeguru.git
synced 2025-03-10 05:34:36 +00:00
[#185 state:fixed] Made an iPhoto-appscript error a bit friendlier.
This commit is contained in:
parent
ea32af04fb
commit
c4824b0f16
@ -154,7 +154,11 @@ class DupeGuruPE(DupeGuruBase):
|
||||
if isinstance(dupe, IPhoto):
|
||||
try:
|
||||
a = app('iPhoto')
|
||||
[photo] = a.photo_library_album().photos[its.image_path == str(dupe.path)]()
|
||||
album = a.photo_library_album()
|
||||
if album is None:
|
||||
msg = "There are communication problems with iPhoto. Try opening iPhoto first, it might solve it."
|
||||
raise EnvironmentError(msg)
|
||||
[photo] = album.photos[its.image_path == str(dupe.path)]()
|
||||
a.remove(photo, timeout=0)
|
||||
except ValueError:
|
||||
msg = "Could not find photo '{}' in iPhoto Library".format(str(dupe.path))
|
||||
|
Loading…
x
Reference in New Issue
Block a user