Changeset 5015


Ignore:
Timestamp:
Feb 8, 2008, 5:45:21 PM (17 years ago)
Author:
ole
Message:

Issues with closing temporary files in Windows. Not fixed - files will leak at the moment.

Location:
anuga_core/source/anuga/utilities
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • anuga_core/source/anuga/utilities/test_data_audit.py

    r5014 r5015  
    8585        # Clean up
    8686        licfid.close()
    87         fid.close()
    88         os.remove(license_filename)
    89         os.remove(tmp_name)       
    90 
     87        os.remove(license_filename)
     88        try:
     89            os.remove(tmp_name)       
     90        except:
     91            # FIXME(Ole)QThis doesn't work on Windows for some reason
     92            pass
     93       
    9194
    9295
     
    154157        # Clean up
    155158        licfid.close()
    156         fid.close()
    157         os.remove(license_filename)
    158         os.remove(tmp_name)       
     159        os.remove(license_filename)
     160
     161        fid.close()       
     162        try:
     163            os.remove(tmp_name)       
     164        except:
     165            # FIXME(Ole)QThis doesn't work on Windows for some reason
     166            pass       
     167
    159168
    160169
     
    281290
    282291        licfid = open(license_filename)
    283 
    284292        license_file_is_valid(licfid)#, verbose=True)
    285                
     293        licfid.close()
     294       
    286295        # Clean up
    287296        os.remove(license_filename)
     
    355364
    356365        licfid = open(license_filename)
    357 
    358366        license_file_is_valid(licfid)#, verbose=True)
     367        licfid.close()
    359368               
    360369        # Clean up
  • anuga_core/source/anuga/utilities/test_xml_tools.py

    r5014 r5015  
    128128               
    129129        # Clean up
     130        fid.close()
    130131        os.remove(tmp_name)
    131         fid.close()
     132
    132133
    133134       
Note: See TracChangeset for help on using the changeset viewer.