From 3c4e200d700c24125479bb754b5f68bdf35b85a6 Mon Sep 17 00:00:00 2001 From: Hemna Date: Sat, 25 Jan 2025 12:54:18 -0500 Subject: [PATCH] Fix the testing of fortune path --- aprsd/plugins/fortune.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/aprsd/plugins/fortune.py b/aprsd/plugins/fortune.py index fb5a2dd..9482022 100644 --- a/aprsd/plugins/fortune.py +++ b/aprsd/plugins/fortune.py @@ -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):