2
0
mirror of https://github.com/Nick80835/microbot synced 2025-09-03 07:55:52 +00:00

print traceback on module load failure

This commit is contained in:
Nick80835
2023-06-08 08:36:25 -04:00
parent 9116e21d06
commit f5c7855922

View File

@@ -3,6 +3,7 @@ from concurrent.futures import ThreadPoolExecutor
from functools import partial
from importlib import import_module, reload
from os.path import basename, dirname, isfile
from traceback import print_exc
from aiohttp import ClientSession
@@ -36,6 +37,7 @@ class Loader():
self.loaded_modules.append(import_module("ubot.modules." + module_name))
except Exception as exception:
self.logger.error(f"Error while loading {module_name}: {exception}")
print_exc()
def reload_all_modules(self):
self.command_handler.incoming_commands = []