Ignore:
Timestamp:
04/02/15 13:21:49 (9 years ago)
Author:
labetoulle
Message:
  • Use allow_no_value option from ConfigParser?, for dods directory in config.ini
  • keep default config.ini.init on svn instead of config.ini, which is to be adapted to each implementation
  • debug project_name processing
Location:
TOOLS/ConsoGENCMIP6/bin
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • TOOLS/ConsoGENCMIP6/bin

    • Property svn:ignore
      •  

        old new  
        11*.pyc 
         2config.ini 
  • TOOLS/ConsoGENCMIP6/bin/libconso.py

    r2463 r2464  
    5252  OUT = {} 
    5353 
    54   config = cp.ConfigParser() 
     54  config = cp.ConfigParser(allow_no_value=True) 
    5555  config.optionxform = str 
    5656  config.read(filename) 
     
    7171  section = "directories" 
    7272  for option in config.options(section): 
    73     res = config.get(section, option) 
    74     if res != "None": 
    75       DIR[option] = res 
    76     else: 
    77       DIR[option] = None 
     73    DIR[option] = config.get(section, option) 
    7874 
    7975    if DIR[option] and not os.path.isdir(DIR[option]): 
     
    221217 
    222218  #--------------------------------------- 
    223   def __init__(self): 
    224     self.project   = "" 
     219  def __init__(self, project_name): 
     220    self.project   = project_name 
    225221    self.date_init = "" 
    226222    self.deadline  = "" 
     
    231227    import json 
    232228    dico = json.load(open(filein, "r")) 
    233     self.project = dico["name"] 
    234229    self.deadline = string_to_date(dico["deadline"]) + \ 
    235230                    dt.timedelta(days=-1) 
Note: See TracChangeset for help on using the changeset viewer.