Changeset 2426


Ignore:
Timestamp:
03/02/15 16:25:33 (7 years ago)
Author:
labetoulle
Message:

Check exit status

Location:
TOOLS/ConsoGENCMIP6/bin
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • TOOLS/ConsoGENCMIP6/bin/conso_gencmip6.py

    r2425 r2426  
    6565    except Exception as rc : 
    6666      print(rc) 
    67       exit() 
     67      exit(1) 
    6868    with open(os.path.join(DIR["DATA"], OUT["CCCMP"]), "w") as fileout: 
    6969      fileout.write(res) 
     
    389389  if not args.dryrun: 
    390390    save_files(OUT, today) 
     391 
     392  exit(0) 
  • TOOLS/ConsoGENCMIP6/bin/plot_bilan.py

    r2425 r2426  
    297297  file_utheo = get_last_file(DIR["SAVEDATA"], OUT["UTHEO"]) 
    298298  file_bilan = get_last_file(DIR["SAVEDATA"], OUT["BILAN"]) 
     299 
     300  if file_param is None or \ 
     301     file_utheo is None or \ 
     302     file_bilan is None: 
     303    print("Missing one or more input files, we stop.") 
     304    print("=> PARAM: {}\n=> UTHEO: {}\n=> BILAN: {}".format( 
     305              file_param, file_utheo, file_bilan) 
     306          ) 
     307    exit(1) 
     308 
    299309  img_name = "bilan" 
    300  
    301310  today = os.path.basename(file_param).strip(OUT["PARAM"]) 
    302311 
     
    408417    plt.show() 
    409418 
    410   exit() 
     419  exit(0) 
Note: See TracChangeset for help on using the changeset viewer.