Changeset - 53cbb449fda7
[Not reviewed]
default
0 2 0
Dennis Fink - 10 years ago 2015-07-08 23:09:28

Backed out changeset: d6a5e1c072ce
2 files changed with 2 insertions and 4 deletions:
0 comments (0 inline, 0 general)
spaceapi/__init__.py
Show inline comments
 
@@ -53,10 +53,7 @@ def create_app():
 
    from .state import state_views
 
    app.register_blueprint(state_views, url_prefix='/state')
 

	
 
    from .sensors import sensors_views
 
    app.register_blueprint(sensors_views, url_prefix='/sensors')
 

	
 
    from .active import reload_json
 
    reload_json()
 

	
 
    return app
 
	return app
spaceapi/active.py
Show inline comments
 
@@ -33,11 +33,12 @@ def reload_json():
 
            active_json.update(default_json)
 
            active_json['state']['open'] = backup['state']['open']
 
            active_json['state']['lastchange'] = backup['state']['lastchange']
 
    else:
 
        active_json = copy.deepcopy(default_json)
 

	
 
reload_json()
 

	
 
def save_last_state():
 

	
 
    with open(last_state_file, mode='w', encoding='utf-8') as f:
 
        json.dump(active_json, f, sort_keys=True)
0 comments (0 inline, 0 general)