1
0
mirror of https://github.com/craigerl/aprsd.git synced 2025-04-19 09:49:01 -04:00

Fix the testing of fortune path

This commit is contained in:
Hemna 2025-01-25 12:54:18 -05:00
parent 2f26eb86f4
commit 3c4e200d70

View File

@ -25,14 +25,14 @@ class FortunePlugin(plugin.APRSDRegexCommandPluginBase):
def setup(self):
for path in FORTUNE_PATHS:
if shutil.which(path):
self.fortune_path = path
self.fortune_path = shutil.which(path)
LOG.info(f'Fortune path {self.fortune_path}')
if self.fortune_path:
break
if not self.fortune_path:
self.enabled = False
else:
self.enabled = True
LOG.info(f'Fortune path {self.fortune_path}')
@trace.trace
def process(self, packet: packets.MessagePacket):