mirror of
https://github.com/craigerl/aprsd.git
synced 2026-06-02 14:14:42 -04:00
Added unit tests for packets.
Also did some code cleanup.
This commit is contained in:
@@ -2,18 +2,18 @@ import logging
|
||||
|
||||
from aprsd import packets, plugin
|
||||
|
||||
LOG = logging.getLogger("APRSD")
|
||||
LOG = logging.getLogger('APRSD')
|
||||
|
||||
|
||||
class HelloPlugin(plugin.APRSDRegexCommandPluginBase):
|
||||
"""Hello World."""
|
||||
|
||||
version = "1.0"
|
||||
version = '1.0'
|
||||
# matches any string starting with h or H
|
||||
command_regex = "^[hH]"
|
||||
command_name = "hello"
|
||||
command_regex = '^[hH]'
|
||||
command_name = 'hello'
|
||||
|
||||
def process(self, packet: packets.MessagePacket):
|
||||
LOG.info("HelloPlugin")
|
||||
LOG.info('HelloPlugin')
|
||||
reply = f"Hello '{packet.from_call}'"
|
||||
return reply
|
||||
|
||||
Reference in New Issue
Block a user