Changeset 546 for trunk


Ignore:
Timestamp:
06/17/09 16:14:34 (15 years ago)
Author:
Nicholas Riley
Message:

Handle delay in sync button being enabled; wait for sync at end.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Update Podcasts/update_podcasts.py

    r492 r546  
    101101    iTunes.sources[its.kind == AEEnum('kPod')].sources[1].library_playlists[1].reveal()
    102102    sync_enabled = iTunes_main_pane().buttons[u'Sync'].enabled
    103     while sync_enabled.get() == False:
     103    while True:
     104        try:
     105            if sync_enabled.get() == True:
     106                return
     107        except CommandError:
     108            pass
    104109        time.sleep(0.5)
    105110
     
    114119    print >> sys.stderr, 'Copying podcast descriptions to lyrics...'
    115120    podcasts_to_lyrics(iTunes)
     121    print >> sys.stderr, 'Synchronizing iPod...'
    116122    iTunes.update()
     123    wait_for_iPod_update(iTunes)
Note: See TracChangeset for help on using the changeset viewer.