Changeset 6257


Ignore:
Timestamp:
Feb 2, 2009, 10:34:52 AM (15 years ago)
Author:
ole
Message:

Reverted 'finally' construction - it turned out not to work in older Python
versions.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • anuga_core/source/anuga/shallow_water/test_shallow_water_domain.py

    r6252 r6257  
    66126612
    66136613       
     6614       
    66146615        try:
    66156616            domain.set_quantity('elevation',
     
    66216622            msg = 'Test failed: %s' % str(e)
    66226623            raise Exception, msg
    6623         finally:
    6624             # Cleanup regardless
     6624            # Cleanup
    66256625            os.remove(meshname)
    6626             os.remove(points_file)
     6626            os.remove(points_file)           
     6627        else:
     6628            # Cleanup       
     6629            os.remove(meshname)
     6630            os.remove(points_file)                   
     6631           
     6632           
     6633           
     6634        #FIXME(Ole): Finally does not work like this in python2.3
     6635        #FIXME(Ole): Reinstate this when Python2.3 is out of the way
     6636        #FIXME(Ole): Python 2.6 apparently introduces something called 'with'
     6637        #finally:
     6638        #    # Cleanup regardless
     6639        #    os.remove(meshname)
     6640        #    os.remove(points_file)
    66276641
    66286642       
Note: See TracChangeset for help on using the changeset viewer.