Changeset 625


Ignore:
Timestamp:
04/04/16 10:25:18 (4 years ago)
Author:
mjuckes
Message:

check for and create directory for xls files

File:
1 edited

Legend:

Unmodified
Added
Removed
  • CMIP6dreqbuild/trunk/src/framework/dreqPy/scope.py

    r613 r625  
    922922      ##print 'odir:::::::::: ',odir 
    923923      ##m = list( mips )[0] 
     924      if not os.path.isdir( odir ): 
     925         try: 
     926            os.mkdir( odir ) 
     927         except: 
     928            print ('\n\nFailed to make directory "%s" for xls files: make necessary subdirectories or run where you have write access' % odir ) 
     929            print ( '\n\n' ) 
     930            raise 
     931         print ('Created directory %s for xls file(s)' % odir ) 
     932 
    924933      self.sc.xlsByMipExpt(mips,eid,pmax,odir=odir) 
    925934  
Note: See TracChangeset for help on using the changeset viewer.