mirror of
https://github.com/katanemo/plano.git
synced 2026-06-17 15:25:17 +02:00
minor fixes to make sure PR is clean. Ready to ship
This commit is contained in:
parent
5f7f38ad24
commit
e771912a86
4 changed files with 49 additions and 106 deletions
|
|
@ -88,23 +88,6 @@ def load_env_file_to_dict(file_path):
|
|||
return env_dict
|
||||
|
||||
|
||||
def read_config_file(path="."):
|
||||
"""Read configuration from arch_config.yaml or config.yaml in the specified path."""
|
||||
config_files = ["arch_config.yaml", "config.yaml"]
|
||||
|
||||
for config_file in config_files:
|
||||
config_path = os.path.abspath(os.path.join(path, config_file))
|
||||
if os.path.exists(config_path):
|
||||
try:
|
||||
with open(config_path, "r") as f:
|
||||
return yaml.safe_load(f)
|
||||
except Exception as e:
|
||||
log.warning(f"Error reading {config_path}: {e}")
|
||||
continue
|
||||
|
||||
return {}
|
||||
|
||||
|
||||
def find_config_file(path=".", file=None):
|
||||
"""Find the appropriate config file path."""
|
||||
if file:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue