Changeset 2464 for TOOLS/ConsoGENCMIP6/bin/libconso.py
- Timestamp:
- 04/02/15 13:21:49 (9 years ago)
- Location:
- TOOLS/ConsoGENCMIP6/bin
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
TOOLS/ConsoGENCMIP6/bin
- Property svn:ignore
-
old new 1 1 *.pyc 2 config.ini
-
- Property svn:ignore
-
TOOLS/ConsoGENCMIP6/bin/libconso.py
r2463 r2464 52 52 OUT = {} 53 53 54 config = cp.ConfigParser( )54 config = cp.ConfigParser(allow_no_value=True) 55 55 config.optionxform = str 56 56 config.read(filename) … … 71 71 section = "directories" 72 72 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) 78 74 79 75 if DIR[option] and not os.path.isdir(DIR[option]): … … 221 217 222 218 #--------------------------------------- 223 def __init__(self ):224 self.project = ""219 def __init__(self, project_name): 220 self.project = project_name 225 221 self.date_init = "" 226 222 self.deadline = "" … … 231 227 import json 232 228 dico = json.load(open(filein, "r")) 233 self.project = dico["name"]234 229 self.deadline = string_to_date(dico["deadline"]) + \ 235 230 dt.timedelta(days=-1)
Note: See TracChangeset
for help on using the changeset viewer.