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:
parent
202c689658
commit
c99a9c919d
@ -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
|
||||
"""
|
||||
|
||||
@ -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
|
||||
"""
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user