mirror of
https://github.com/craigerl/aprsd.git
synced 2025-07-07 11:25:15 -04:00
Fix the testing of fortune path
This commit is contained in:
parent
2f26eb86f4
commit
3c4e200d70
@ -25,14 +25,14 @@ class FortunePlugin(plugin.APRSDRegexCommandPluginBase):
|
|||||||
|
|
||||||
def setup(self):
|
def setup(self):
|
||||||
for path in FORTUNE_PATHS:
|
for path in FORTUNE_PATHS:
|
||||||
if shutil.which(path):
|
self.fortune_path = shutil.which(path)
|
||||||
self.fortune_path = path
|
LOG.info(f'Fortune path {self.fortune_path}')
|
||||||
|
if self.fortune_path:
|
||||||
break
|
break
|
||||||
if not self.fortune_path:
|
if not self.fortune_path:
|
||||||
self.enabled = False
|
self.enabled = False
|
||||||
else:
|
else:
|
||||||
self.enabled = True
|
self.enabled = True
|
||||||
LOG.info(f'Fortune path {self.fortune_path}')
|
|
||||||
|
|
||||||
@trace.trace
|
@trace.trace
|
||||||
def process(self, packet: packets.MessagePacket):
|
def process(self, packet: packets.MessagePacket):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user