Changeset 665


Ignore:
Timestamp:
Dec 2, 2004, 5:31:08 PM (20 years ago)
Author:
duncan
Message:

making it backwards compatible...

File:
1 edited

Legend:

Unmodified
Added
Removed
  • inundation/ga/storm_surge/pmesh/load_mesh/loadASCII.py

    r658 r665  
    272272        fragments = line.split()
    273273        #print fragments
    274         fragments.pop(0) #pop off the index
    275         if len(fragments) == 0: #no max area
     274        # The try is here for format compatibility
     275        try:
     276            fragments.pop(0) #pop off the index
     277            if len(fragments) == 0: #no max area
     278                regionmaxareas.append(None)
     279            else:
     280                regionmaxareas.append(float(fragments[0]))
     281        else:
    276282            regionmaxareas.append(None)
    277         else:
    278             regionmaxareas.append(float(fragments[0]))
    279 
    280283       
    281284    meshDict = {}
Note: See TracChangeset for help on using the changeset viewer.