You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@marvin.apache.org by we...@apache.org on 2022/01/19 04:26:45 UTC
[incubator-marvin] 11/11: Creating config directory in the path
This is an automated email from the ASF dual-hosted git repository.
weichen pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/incubator-marvin.git
commit bc6768ebf9c9010cc0ca59d866bb3d7f608f2d83
Author: cardosolucas <ca...@gmail.com>
AuthorDate: Mon Jan 17 21:39:37 2022 -0300
Creating config directory in the path
---
python-toolbox/marvin_python_toolbox/utils/config.py | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/python-toolbox/marvin_python_toolbox/utils/config.py b/python-toolbox/marvin_python_toolbox/utils/config.py
index 58560fc..20c66a8 100755
--- a/python-toolbox/marvin_python_toolbox/utils/config.py
+++ b/python-toolbox/marvin_python_toolbox/utils/config.py
@@ -51,14 +51,15 @@ def read_cli_conf():
return json.load(conf_file)
def generate_default_conf():
- filepath = os.path.join(os.environ['MARVIN_DATA_PATH'], '.conf', 'cli_conf.json')
+ filefolder = os.path.join(os.environ['MARVIN_DATA_PATH'], '.conf')
+ filepath = os.path.join(filefolder, 'cli_conf.json')
config = {
'default_host': 'localhost',
'editor': 'nano',
'executor_url': 'https://s3.amazonaws.com/marvin-engine-executor/marvin-engine-executor-assembly-0.0.5.jar'
}
- if not os.path.exists(filepath):
+ if not os.path.exists(filefolder):
os.makedirs(filepath)
with open(filepath, 'w') as conf: