Changeset 8319


Ignore:
Timestamp:
17/05/12 14:42:58 (7 years ago)
Author:
jhorton
Message:

added exception handling for extents

File:
1 edited

Legend:

Unmodified
Added
Removed
  • mauRepo/MolesManager/trunk/src/MolesManager/views/cedaBrowse.py

    r8318 r8319  
    6565    c['lineage'] = record.dataLineage; 
    6666    c['archive_no_files'] = record.result.numberOfFiles 
    67     c['geographic_extentE'] = record.geographicExtent[0].eastBoundLongitude 
    68     c['geographic_extentW'] = record.geographicExtent[0].westBoundLongitude 
    69     c['geographic_extentN'] = record.geographicExtent[0].northBoundLatitude 
    70     c['geographic_extentS'] = record.geographicExtent[0].southBoundLatitude 
     67    try: 
     68        c['geographic_extentE'] = record.geographicExtent[0].eastBoundLongitude 
     69        c['geographic_extentW'] = record.geographicExtent[0].westBoundLongitude 
     70        c['geographic_extentN'] = record.geographicExtent[0].northBoundLatitude 
     71        c['geographic_extentS'] = record.geographicExtent[0].southBoundLatitude 
     72    except: 
     73        c['geographic_extentE'] = 180 
     74        c['geographic_extentW'] = -180 
     75        c['geographic_extentN'] = 90 
     76        c['geographic_extentS'] = -90 
    7177    c['related_data'] = record.relatedObservation; 
    7278    c['quality_statement'] = record.resultQuality 
Note: See TracChangeset for help on using the changeset viewer.