From d83e842551d3bf14646f1415629859593400ae32 Mon Sep 17 00:00:00 2001 From: Sven Heidemann Date: Sat, 8 Jan 2022 19:08:13 +0100 Subject: [PATCH] Added PyCharm support to boot-log module --- src/modules/boot_log/boot_log.py | 2 +- src/modules/boot_log/boot_log_extension.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/modules/boot_log/boot_log.py b/src/modules/boot_log/boot_log.py index 3d0044c..dd9261f 100644 --- a/src/modules/boot_log/boot_log.py +++ b/src/modules/boot_log/boot_log.py @@ -42,7 +42,7 @@ class BootLog(ModuleABC, OnReadyABC): try: start_time = self._config.get_configuration('Bot_StartTime') init_time = round((datetime.now() - start_time).total_seconds(), 2) - self._config.add_configuration('InitTime', init_time) + self._config.add_configuration('InitTime', str(init_time)) self._logger.debug(__name__, f'Bot Init time: {init_time}s') # print warning if initialisation took too long if init_time >= 30: diff --git a/src/modules/boot_log/boot_log_extension.py b/src/modules/boot_log/boot_log_extension.py index 9d66642..8bb36c7 100644 --- a/src/modules/boot_log/boot_log_extension.py +++ b/src/modules/boot_log/boot_log_extension.py @@ -14,4 +14,4 @@ class BootLogExtension(ApplicationExtensionABC): async def run(self, config: ConfigurationABC, services: ServiceProviderABC): logger: LoggerABC = services.get_service(LoggerABC) logger.debug(__name__, 'BootLog extension started') - config.add_configuration('Bot_StartTime', datetime.now()) + config.add_configuration('Bot_StartTime', str(datetime.now()))