mistercrunch closed pull request #4143: Create DATA_DIR after importing config
URL: https://github.com/apache/incubator-superset/pull/4143
This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:
As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):
diff --git a/superset/__init__.py b/superset/__init__.py
index 9ef665ecca..5d0c674a8d 100644
--- a/superset/__init__.py
+++ b/superset/__init__.py
@@ -22,6 +22,9 @@
APP_DIR = os.path.dirname(__file__)
CONFIG_MODULE = os.environ.get('SUPERSET_CONFIG', 'superset.config')
+if not os.path.exists(config.DATA_DIR):
+ os.makedirs(config.DATA_DIR)
+
with open(APP_DIR + '/static/assets/backendSync.json', 'r') as f:
frontend_config = json.load(f)
diff --git a/superset/config.py b/superset/config.py
index e169f12ccc..c2da1db8b5 100644
--- a/superset/config.py
+++ b/superset/config.py
@@ -28,8 +28,6 @@
DATA_DIR = os.environ['SUPERSET_HOME']
else:
DATA_DIR = os.path.join(os.path.expanduser('~'), '.superset')
-if not os.path.exists(DATA_DIR):
- os.makedirs(DATA_DIR)
# ---------------------------------------------------------
# Superset specific config
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services