fix: APRSISDriver.is_configured() returns False when driver is disabled (#236)

The final `return True` in is_configured() should be `return False`.
When APRS-IS is not enabled, the method always returned True, so the
startup guard in server.py never fired for misconfigured instances.

Closes #2
This commit is contained in:
2026-08-28 12:10:50 -04:00
committed by GitHub
parent 3a231264b1
commit 4ea9e33e20
3 changed files with 5 additions and 3 deletions
+2
View File
@@ -8,6 +8,8 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
##### Bug Fixes
- Fix APRSISDriver.is_configured() always returning True when driver is disabled [`a9ef65f`](https://github.com/craigerl/aprsd/commit/a9ef65f)
- Fix PacketList.tx() docstring: "received" → "transmitted" [`2e3d556`](https://github.com/craigerl/aprsd/commit/2e3d556)
- Add aprsd/~/ to .gitignore; remove stale tilde directory from repo [`1b08e1c`](https://github.com/craigerl/aprsd/commit/1b08e1c)
+1 -1
View File
@@ -73,7 +73,7 @@ class APRSISDriver:
)
return True
return True
return False
@property
def is_alive(self):
+2 -2
View File
@@ -162,9 +162,9 @@ class TestAPRSISDriver(unittest.TestCase):
APRSISDriver.is_configured()
def test_is_configured_disabled(self):
"""Test is_configured returns True when not enabled."""
"""Test is_configured returns False when not enabled."""
with mock.patch.object(APRSISDriver, 'is_enabled', return_value=False):
self.assertTrue(APRSISDriver.is_configured())
self.assertFalse(APRSISDriver.is_configured())
def test_is_alive_no_client(self):
"""Test is_alive returns False when no client."""