Skip to content

Commit 9116853

Browse files
Code reformatting
1 parent 1e045ee commit 9116853

File tree

1 file changed

+7
-9
lines changed

1 file changed

+7
-9
lines changed

src/AprsLibrary.py

+7-9
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,7 @@ def connect_aprsis(self):
334334
# Finally, connect to APRS-IS
335335
self.ais.connect(blocking=True)
336336

337-
# Are we connected? If not, then properly destroy what we
337+
# Are we connected? If not, then properly destroy what we
338338
# may have gathered as data and raise an error
339339
if not self.ais._connected:
340340
disconnect_aprsis(self)
@@ -376,17 +376,15 @@ def send_aprs_packet(self, packet: str):
376376
# Are we connected?
377377
if not self.ais:
378378
raise ConnectionError("Not connected to APRS-IS; cannot send packet")
379-
379+
380380
# We seem to be connected
381381
logger.debug(msg=f"Sending message '{packet}' to APRS-IS")
382382

383383
# Try to send data to the socket
384384
try:
385385
self.ais.sendall(packet)
386386
except:
387-
raise ConnectionError(
388-
f"Error while sending message '{packet}' to APRS-IS"
389-
)
387+
raise ConnectionError(f"Error while sending message '{packet}' to APRS-IS")
390388

391389
@keyword("Receive APRS Packet")
392390
def receive_aprs_packet(self, immortal: bool = True, raw: bool = False):
@@ -460,7 +458,7 @@ def get_msgno(self, aprs_packet):
460458
)
461459

462460
# This is the core function which will extract the requested
463-
# field name from our packet(s). The packet can either be in
461+
# field name from our packet(s). The packet can either be in
464462
# raw format (str or bytes) OR decoded. If you try to access
465463
# a field that does not exist, this function will raise
466464
# an exception. Use the "check ..." methods if you want to
@@ -549,8 +547,8 @@ def check_packet_msgno(self, aprs_packet):
549547
)
550548

551549
# This is the core function which will check if a field exists
552-
# in our packet(s). The packet can either be in
553-
# raw format (str or bytes) OR decoded.
550+
# in our packet(s). The packet can either be in
551+
# raw format (str or bytes) OR decoded.
554552
@keyword("APRS Message should contain")
555553
def check_if_field_exists_in_packet(self, aprs_packet, field_name):
556554
t_dict = type(dict())
@@ -594,4 +592,4 @@ def get_alphanumeric_counter_value(numeric_counter: int):
594592

595593

596594
if __name__ == "__main__":
597-
pass
595+
pass

0 commit comments

Comments
 (0)