fix: stop logging a literal None for single-server DNS #220

Merged
mysticalsoap merged 1 commit from single-server-log into trunk 2026-09-16 20:47:49 -04:00
Owner

Problem

Blank alt_dns2 made one server a real configuration (#167), but set_dns's log messages still format the pair unconditionally — a live single-server connect logs DNS: Set 192.168.0.205 and None as dns servers on wg_aqomui (seen 2026-09-16).

Fix

Build the server list string once (X or X and Y) and use it in both the resolved and the resolv.conf branch.

Verification

New TestSetDns.test_single_server_logs_without_a_none: a single-server apply logs the server with no None in the message. Full suite: 526 passed (+ tests/test_mgmt.py separately); ruff E9,F63,F7,F82 and compileall clean.

🤖 Generated with Claude Code

**Problem** Blank `alt_dns2` made one server a real configuration (#167), but `set_dns`'s log messages still format the pair unconditionally — a live single-server connect logs `DNS: Set 192.168.0.205 and None as dns servers on wg_aqomui` (seen 2026-09-16). **Fix** Build the server list string once (`X` or `X and Y`) and use it in both the resolved and the resolv.conf branch. **Verification** New `TestSetDns.test_single_server_logs_without_a_none`: a single-server apply logs the server with no `None` in the message. Full suite: 526 passed (+ `tests/test_mgmt.py` separately); ruff E9,F63,F7,F82 and `compileall` clean. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
fix: stop logging a literal None for single-server DNS
All checks were successful
ci / test (pull_request) Successful in 23s
ci / test (push) Successful in 36s
2d5fa7c771
Blank alt_dns2 made one server a real configuration (#167), but
set_dns's messages still formatted the pair unconditionally:
"Set 192.168.0.205 and None as dns servers on wg_aqomui". Build the
server list string once and use it in both the resolved and the
resolv.conf branch.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
mysticalsoap deleted branch single-server-log 2026-09-16 20:47:49 -04:00
Sign in to join this conversation.
No description provided.