1
0
mirror of https://github.com/checktheroads/hyperglass synced 2024-05-11 05:55:08 +00:00

fix missing commands.yaml file error when running setup

This commit is contained in:
checktheroads
2021-01-03 00:06:19 -07:00
parent e9fb2eb4bf
commit 03a7d803c9
2 changed files with 10 additions and 5 deletions

View File

@ -54,7 +54,9 @@ CONFIG_FILES = (
def _check_config_files(directory: Path):
"""Verify config files exist and are readable."""
files = ()
for file in CONFIG_FILES:
file_name, required = file
file_path = directory / file_name
@ -70,7 +72,7 @@ def _check_config_files(directory: Path):
+ "Defaults will be used.",
f=str(file_path),
)
files += (file_path,)
files += (checked,)
return files
@ -97,8 +99,10 @@ def _config_required(config_path: Path) -> Dict:
def _config_optional(config_path: Path) -> Dict:
config = {}
if config_path is None:
config = {}
return config
else:
try:

View File

@ -65,8 +65,9 @@ def check_path(
else:
raise FileNotFoundError(f"{str(path)} does not exist.")
with path.open(mode):
result = path
if path.exists():
with path.open(mode):
result = path
except Exception:
result = None
@ -517,7 +518,7 @@ async def build_frontend( # noqa: C901
params: Dict,
app_path: Path,
force: bool = False,
):
) -> bool:
"""Perform full frontend UI build process.
Securely creates temporary file, writes frontend configuration