From 1f56fa8fe1dd2fe8491c1b96c429556c52afc164 Mon Sep 17 00:00:00 2001 From: avollkopf <43980694+avollkopf@users.noreply.github.com> Date: Wed, 1 May 2024 20:36:29 +0200 Subject: [PATCH] fixas 'last boot log' was always overwritten --- cbpi/controller/system_controller.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/cbpi/controller/system_controller.py b/cbpi/controller/system_controller.py index 89387fc..c5b4256 100644 --- a/cbpi/controller/system_controller.py +++ b/cbpi/controller/system_controller.py @@ -157,12 +157,12 @@ class SystemController: j.seek_realtime(since) for entry in j: result.append(entry['MESSAGE']) - try: - with open(fullname, 'w') as f: - for line in result: - f.write(f"{line}\n") - except Exception as e: - logging.error(e) + try: + with open(fullname, 'w') as f: + for line in result: + f.write(f"{line}\n") + except Exception as e: + logging.error(e) plugins = await self.plugins_list() with open(fullpluginname, 'w') as f: