Example #1
0
 def _read_project_json(project_name):
     path = PathUtil.get_project_json(project_name)
     if os.path.exists(path):
         with open(path, 'r', encoding='utf8') as fp:
             return json.load(fp)
     else:
         return {'name': project_name, 'description': '--'}
Example #2
0
 def _write_project_json(project_name, project_json):
     path = PathUtil.get_project_json(project_name)
     with open(path, "w") as fp:
         fp.write(json.dumps(project_json, indent=4))