Changeset 6665


Ignore:
Timestamp:
Mar 31, 2009, 12:41:08 PM (15 years ago)
Author:
rwilson
Message:

Final form, for now.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • anuga_validation/automated_validation_tests/patong_validation/validate_patong.py

    r6660 r6665  
    119119        return auth
    120120
    121     log.debug('----------------------------------------- refreshing local data')
     121    log.debug('Refreshing local data ...')
    122122   
    123123    # create local data directory if required
     
    140140        untar_file(tar_path, target_dir=Local_Data_Directory)
    141141       
    142     log.debug('Update done.')
    143     log.debug('----------------------------------------- refreshing local data')
     142    log.debug('Local data has been refreshed.')
    144143
    145144
     
    210209    # clear all data objects from local data directory
    211210    for data_object in Local_Data_Objects:
    212         obj_path = os.path.join(Remote_Data_Directory, data_object)
    213         shutil.rmtree(obj_path, ignore_errors=True)
     211        obj_path = os.path.join(Local_Data_Directory, data_object)
     212        if os.path.isfile(obj_path):
     213            os.remove(obj_path)
     214        else:
     215            shutil.rmtree(obj_path, ignore_errors=True)
     216
     217    # remove remote directory and stdout capture file
     218    shutil.rmtree(Remote_Data_Directory, ignore_errors=True)
     219    os.remove(RUNMODEL_STDOUT)
    214220           
    215221
     
    226232
    227233# run the simulation
    228 ##import cProfile
    229 ##cProfile.run('run_simulation()', filename='patong.prof')
    230 
    231234run_simulation()
    232235
Note: See TracChangeset for help on using the changeset viewer.