mirror of
https://github.com/pyMC-dev/pyMC_Repeater.git
synced 2026-08-07 01:13:11 +02:00
fix: improve error logging for invalid policy entries and adjust test configuration
This commit is contained in:
@@ -441,7 +441,11 @@ class APIEndpoints:
|
||||
continue
|
||||
try:
|
||||
entry_value = self._normalize_policy_entry_value(kind, entry.get("value"))
|
||||
except Exception:
|
||||
except Exception as exc:
|
||||
logger.warning(
|
||||
"Skipping invalid policy entry at index %d: %s", ent_idx, exc
|
||||
)
|
||||
|
||||
continue
|
||||
|
||||
entry_id = self._slugify_policy_id(
|
||||
|
||||
@@ -16,7 +16,6 @@ import yaml
|
||||
|
||||
from repeater.web.api_endpoints import APIEndpoints
|
||||
|
||||
|
||||
# Minimal initial config.yaml the wizard writes into.
|
||||
_BASE_CONFIG = {
|
||||
"repeater": {"node_name": "mesh-repeater-01", "security": {"admin_password": "admin123"}},
|
||||
@@ -66,11 +65,11 @@ def wizard_env(tmp_path, monkeypatch):
|
||||
# config has no explicit storage_dir set — that's exactly what we want
|
||||
# so the wizard finds our radio-settings.json next to config.yaml.
|
||||
config = {
|
||||
"storage_dir": str(tmp_path),
|
||||
"repeater": {
|
||||
"storage_dir": str(tmp_path),
|
||||
"node_name": "mesh-repeater-01",
|
||||
"security": {"admin_password": "admin123"},
|
||||
}
|
||||
},
|
||||
}
|
||||
endpoints = APIEndpoints(config=config, config_path=str(config_path))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user