Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Overwrite analysis inputs file #163

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 8 additions & 11 deletions src/mvesuvio/util/handle_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,7 @@ def setup_config_dir(config_dir):


def setup_default_inputs():
if not os.path.isfile(VESUVIO_INPUTS_PATH):
copyfile(
_ = copyfile(
os.path.join(VESUVIO_PACKAGE_PATH, "config", VESUVIO_INPUTS_FILE),
os.path.join(VESUVIO_INPUTS_PATH),
)
Expand All @@ -107,15 +106,13 @@ def setup_default_ipfile_dir():
)


def __mk_dir(type, path):
success = False
if not os.path.isdir(path):
try:
os.makedirs(path)
success = True
except:
print(f"Unable to make {type} directory at location: {path}")
return success
def __mk_dir(type:str, path: str):
try:
os.makedirs(path, exist_ok=True)
return True
except:
print(f"Unable to make {type} directory at location: {path}")
return False


def config_set():
Expand Down
Loading