Commit 9f5e9924 authored by Oleg Dzhimiev's avatar Oleg Dzhimiev

switched to creating a working copy of projects.json

parent 5f6a0a0f
...@@ -13,10 +13,20 @@ __status__ = "Development" ...@@ -13,10 +13,20 @@ __status__ = "Development"
import subprocess import subprocess
import os import os
import sys import sys
import shutil
import json import json
from collections import OrderedDict from collections import OrderedDict
projects_file = "projects.json"
projects_default_file = "projects-default.json"
if not os.path.isfile(projects_file):
if os.path.isfile(projects_default_file):
shutil.copy(projects_default_file,projects_file)
sys.exit()
with open('projects.json') as data_file: with open('projects.json') as data_file:
Projects = json.load(data_file, object_pairs_hook=OrderedDict) Projects = json.load(data_file, object_pairs_hook=OrderedDict)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment