diff --git a/sopel_modules/SpiceBot_Logs/ErrorDisplay.py b/sopel_modules/SpiceBot_Logs/ErrorDisplay.py index f4ecbb4..db978ab 100644 --- a/sopel_modules/SpiceBot_Logs/ErrorDisplay.py +++ b/sopel_modules/SpiceBot_Logs/ErrorDisplay.py @@ -18,12 +18,8 @@ def bot_startup_monologue_start(bot, trigger): searchphrasefound = [] for line in debuglines: - if "modules failed to load" in str(line) and "0 modules failed to load" not in str(line): - searchphrase = str(line).replace(" modules failed to load", "") - searchphrasefound.append(str(searchphrase) + " module(s) failed") - elif "dict files failed to load" in str(line) and "0 dict files failed to load" not in str(line): - searchphrase = str(line).replace(" dict files failed to load", "") - searchphrasefound.append(str(searchphrase) + " dict file(s) failed") + if str(line).endswith("failed to load") and not str(line).startswith("0"): + searchphrasefound.append(line) if len(searchphrasefound): for foundphase in searchphrasefound: diff --git a/sopel_modules/SpiceBot_SBTools/__init__.py b/sopel_modules/SpiceBot_SBTools/__init__.py index 46284d8..406abe1 100644 --- a/sopel_modules/SpiceBot_SBTools/__init__.py +++ b/sopel_modules/SpiceBot_SBTools/__init__.py @@ -440,10 +440,10 @@ def read_directory_json_to_dict(bot, directories, configtypename="Config File", if filecount: if bot: - bot_logging(bot, log_from, 'Registered %d %s files,' % (filecount, configtypename)) - bot_logging(bot, log_from, '%d %s files failed to load' % (fileopenfail, configtypename)) + bot_logging(bot, log_from, 'Registered %d %s dict files,' % (filecount, configtypename)) + bot_logging(bot, log_from, '%d %s dict files failed to load' % (fileopenfail, configtypename), True) else: if bot: - bot_logging(bot, log_from, "Warning: Couldn't load any %s files" % (configtypename)) + bot_logging(bot, log_from, "Warning: Couldn't load any %s dict files" % (configtypename)) return configs_dict