Changeset 6824
- Timestamp:
- Apr 17, 2009, 1:44:22 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/numpy_anuga_validation/automated_validation_tests/patong_beach_validation/validate_patong.py
r6808 r6824 55 55 56 56 These are expected to be *.tgz files/directories. 57 Return True if all went well, else False. 57 58 ''' 58 59 … … 88 89 local_digest, auth=auth) 89 90 if auth == False: 91 log.info("Couldn't fetch file: %s" % digest_url) 90 92 return False 91 93 log.info('Fetching remote file %s' % object_url) … … 123 125 124 126 # create local data directory if required 127 log.debug('Creating local directory: %s' % Local_Data_Directory) 125 128 if not os.path.exists(Local_Data_Directory): 126 129 os.mkdir(Local_Data_Directory) 127 130 128 131 # clean out remote data copy directory 132 log.debug('Cleaning remote directory: %s' % Remote_Data_Directory) 129 133 shutil.rmtree(Remote_Data_Directory, ignore_errors=True) 130 134 os.mkdir(Remote_Data_Directory) … … 133 137 auth = None 134 138 for data_object in Local_Data_Objects: 139 log.debug('Trying to update: %s' % data_object) 135 140 auth = update_object(data_object, auth) 136 141 if auth == False: 142 log.debug('Failed fetching %s, returning False' % data_object) 137 143 return False 138 144 … … 155 161 ''' 156 162 157 log.critical('Checking if you have the required files ...')163 log.critical('Checking if you have the required files to run locally ...') 158 164 159 165 have_files = True … … 180 186 # now untar file/directory objects 181 187 for obj in Local_Data_Objects: 182 log. debug('Untarring %s in directory %s'183 188 log.info('Untarring %s in directory %s' 189 % (obj_path, Local_Data_Directory)) 184 190 untar_file(obj_path, target_dir=Local_Data_Directory) 185 191 … … 298 304 # make sure local data is up to date 299 305 if not update_local_data(): 306 log.info("Can't update local files over the internet (for some reason).") 300 307 if not can_we_run(): 301 308 log.critical('') … … 316 323 317 324 # clean up 318 teardown()325 #teardown()
Note: See TracChangeset
for help on using the changeset viewer.