1
0
mirror of https://github.com/craigerl/aprsd.git synced 2026-03-12 02:50:02 -04:00

fixed inconsistent driver send() declaration.

The KISS drivers aren't adhering to the protocol for
defining the send() method.  both now specify that they
return a bool.
This commit is contained in:
Walter Boring 2026-02-18 13:49:40 -05:00
parent 202c689658
commit c99a9c919d
2 changed files with 8 additions and 2 deletions

View File

@ -192,12 +192,15 @@ class SerialKISSDriver(KISSDriver):
self._connected = False
break
def send(self, packet: core.Packet):
def send(self, packet: core.Packet) -> bool:
"""Send an APRS packet.
Args:
packet: APRS packet to send (Packet or Message object)
Returns:
bool: True if packet was sent successfully
Raises:
Exception: If not connected or send fails
"""

View File

@ -96,12 +96,15 @@ class TCPKISSDriver(KISSDriver):
else:
LOG.warning('close: socket not initialized. no reason to close.')
def send(self, packet: core.Packet):
def send(self, packet: core.Packet) -> bool:
"""Send an APRS packet.
Args:
packet: APRS packet to send (Packet or Message object)
Returns:
bool: True if packet was sent successfully
Raises:
Exception: If not connected or send fails
"""