Changeset 2975 for trunk


Ignore:
Timestamp:
Jan 31, 2010, 10:44:53 PM (15 years ago)
Author:
gdb
Message:

Catch error if fetch_image fails

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/packages/invirt-images/invirt-images

    r2974 r2975  
    143143    if cdrom.mirror_id is None:
    144144        return
    145     temp_file = fetch_image(cdrom)
     145    try:
     146        temp_file = fetch_image(cdrom)
     147    except InvirtImageException, e:
     148        print >>sys.stderr, 'ERROR: %s.  Skipping.' % e
     149        return
     150
    146151    try:
    147152        st_size = os.stat(temp_file).st_size
Note: See TracChangeset for help on using the changeset viewer.