Changeset 25b14be in flex_extract.git for source/pythontest/TestInstallTar/flex_extract_v7.1_ecgate/source/python/classes/MarsRetrieval.py
- Timestamp:
- Sep 23, 2018, 11:40:28 AM (6 years ago)
- Branches:
- master, ctbto, dev
- Children:
- 4971f63
- Parents:
- 5d42acd
- File:
-
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
source/pythontest/TestInstallTar/flex_extract_v7.1_ecgate/source/python/classes/MarsRetrieval.py
r2fb99de r25b14be 311 311 ''' 312 312 @Description: 313 Prints all class attributes and their values. 313 Prints all class attributes and their values to the 314 standard output. 314 315 315 316 @Input: … … 329 330 pass 330 331 else: 331 print item[0] + ': ' + str(item[1])332 print(item[0] + ': ' + str(item[1])) 332 333 333 334 return 334 335 335 336 336 def print_info(self): 337 ''' 337 def print_info(self, inputdir): 338 ''' 339 @Description: 340 Prints all mars requests to an extra file for debugging and 341 information. 342 343 @Input: 344 self: instance of MarsRetrieval 345 For description see class documentation. 346 347 inputdir: string 348 The path where all data from the retrievals are stored. 349 350 @Return: 351 <nothing> 338 352 ''' 339 353 # Get all class attributes and their values as a dictionary … … 341 355 342 356 # open a file to store all requests to 343 with open(os.path.join( _config.PATH_RUN_DIR + os.path.sep +357 with open(os.path.join(inputdir, 344 358 _config.FILE_MARS_REQUESTS), 'a') as f: 345 359 f.write('mars\n') … … 394 408 self.server.execute(s, target) 395 409 except: 396 print('MARS Request failed, '397 'have you already registered at apps.ecmwf.int?')410 print('MARS Request failed, \ 411 have you already registered at apps.ecmwf.int?') 398 412 raise IOError 399 413 if os.stat(target).st_size == 0: … … 407 421 stderr=subprocess.PIPE, bufsize=1) 408 422 pout = p.communicate(input=s)[0] 409 print pout.decode()423 print(pout.decode()) 410 424 411 425 if 'Some errors reported' in pout.decode():
Note: See TracChangeset
for help on using the changeset viewer.