[#19 state:fixed] Now there are "timeout=0" args in *every* AS calls. It *has* to work.

--HG--
extra : convert_revision : svn%3Ac306627e-7827-47d3-bdf0-9a457c9553a1/trunk%4088
This commit is contained in:
hsoft 2009-06-19 10:51:34 +00:00
parent fa66bea92f
commit 3f5a5687f9
1 changed files with 3 additions and 1 deletions

View File

@ -150,6 +150,7 @@ class DupeGuruPE(app_cocoa.DupeGuru):
if any(isinstance(dupe, IPhoto) for dupe in marked):
j = j.start_subjob([6, 4], "Probing iPhoto. Don\'t touch it during the operation!")
a = app('iPhoto')
a.activate(timeout=0)
a.select(a.photo_library_album(timeout=0), timeout=0)
photos = as_fetch(a.photo_library_album().photos, k.item)
for photo in j.iter_with_progress(photos):
@ -162,7 +163,8 @@ class DupeGuruPE(app_cocoa.DupeGuru):
if isinstance(dupe, IPhoto):
if unicode(dupe.path) in self.path2iphoto:
photo = self.path2iphoto[unicode(dupe.path)]
app('iPhoto').remove(photo)
a = app('iPhoto')
a.remove(photo, timeout=0)
return True
else:
logging.warning("Could not find photo {0} in iPhoto Library", unicode(dupe.path))