diff --git a/.gitignore b/.gitignore index 53555e07..67f06ead 100644 --- a/.gitignore +++ b/.gitignore @@ -13,3 +13,4 @@ ambianic/webapp/bower_components/paper/ **/coverage.xml **/.__* _mdwriter.cson +**/timeline-event-log.yaml diff --git a/src/ambianic/webapp/flaskr.py b/src/ambianic/webapp/flaskr.py index 86f8d6a9..9af1f60f 100755 --- a/src/ambianic/webapp/flaskr.py +++ b/src/ambianic/webapp/flaskr.py @@ -16,13 +16,18 @@ # configuration DEBUG = True +DEFAULT_DATA_DIR = './data' class FlaskJob(ManagedService): def __init__(self, config): self.config = config - data_dir = config.get('data_dir', './data') + data_dir = None + if config: + data_dir = config.get('data_dir', None) + if not data_dir: + data_dir = DEFAULT_DATA_DIR self.srv = None app = create_app(data_dir=data_dir) self.srv = make_server('0.0.0.0', 8778, app)