Changeset 3084


Ignore:
Timestamp:
Jun 5, 2006, 4:33:39 PM (19 years ago)
Author:
ole
Message:

Made end detection in readUnGenerate more robust

File:
1 edited

Legend:

Unmodified
Added
Removed
  • inundation/pmesh/mesh.py

    r3027 r3084  
    28402840    last line:  "END"
    28412841    """
    2842     END_DELIMITER = 'END\n'
     2842    END_DELIMITER = 'END'
    28432843   
    28442844    points = []
     
    28562856       
    28572857        line = fd.readline() #Read the next line
    2858         while line <> END_DELIMITER:
     2858        while not line.startswith(END_DELIMITER):
    28592859            #print "line >" + line + "<"
    28602860            fragments = line.split()
     
    28832883        line = fd.readline() # read <# of polynomial> <x> <y> OR END
    28842884        #print "line >>" + line + "<<"
    2885         if line == END_DELIMITER:
     2885        if line.startswith(END_DELIMITER):
    28862886            isEnd = True
    28872887   
Note: See TracChangeset for help on using the changeset viewer.