mirror of
https://github.com/Chia-Network/chia-blockchain.git
synced 2024-11-10 12:29:49 +03:00
Use the passed root_path in configure CLI command (#10694)
This commit is contained in:
parent
48cd97cf47
commit
1c8e4aef10
@ -4,7 +4,6 @@ from typing import Dict, Optional
|
|||||||
import click
|
import click
|
||||||
|
|
||||||
from chia.util.config import get_config_lock, load_config, save_config, str2bool
|
from chia.util.config import get_config_lock, load_config, save_config, str2bool
|
||||||
from chia.util.default_root import DEFAULT_ROOT_PATH
|
|
||||||
|
|
||||||
|
|
||||||
def configure(
|
def configure(
|
||||||
@ -25,7 +24,7 @@ def configure(
|
|||||||
seeder_nameserver: str,
|
seeder_nameserver: str,
|
||||||
):
|
):
|
||||||
with get_config_lock(root_path, "config.yaml"):
|
with get_config_lock(root_path, "config.yaml"):
|
||||||
config: Dict = load_config(DEFAULT_ROOT_PATH, "config.yaml", acquire_lock=False)
|
config: Dict = load_config(root_path, "config.yaml", acquire_lock=False)
|
||||||
change_made = False
|
change_made = False
|
||||||
if set_node_introducer:
|
if set_node_introducer:
|
||||||
try:
|
try:
|
||||||
@ -75,7 +74,7 @@ def configure(
|
|||||||
levels = ["CRITICAL", "ERROR", "WARNING", "INFO", "DEBUG", "NOTSET"]
|
levels = ["CRITICAL", "ERROR", "WARNING", "INFO", "DEBUG", "NOTSET"]
|
||||||
if set_log_level in levels:
|
if set_log_level in levels:
|
||||||
config["logging"]["log_level"] = set_log_level
|
config["logging"]["log_level"] = set_log_level
|
||||||
print(f"Logging level updated. Check {DEFAULT_ROOT_PATH}/log/debug.log")
|
print(f"Logging level updated. Check {root_path}/log/debug.log")
|
||||||
change_made = True
|
change_made = True
|
||||||
else:
|
else:
|
||||||
print(f"Logging level not updated. Use one of: {levels}")
|
print(f"Logging level not updated. Use one of: {levels}")
|
||||||
|
Loading…
Reference in New Issue
Block a user