From 756e2f641d9eec66ca7d380b36f5434930387dbf Mon Sep 17 00:00:00 2001 From: adventuretc Date: Fri, 19 Jan 2024 18:35:58 +0100 Subject: [PATCH] Fixed SafeEyes not being able to run on ubuntu 20.04 LTS --- safeeyes/plugins/healthstats/plugin.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/safeeyes/plugins/healthstats/plugin.py b/safeeyes/plugins/healthstats/plugin.py index e1cae38..72324e5 100644 --- a/safeeyes/plugins/healthstats/plugin.py +++ b/safeeyes/plugins/healthstats/plugin.py @@ -55,7 +55,9 @@ def init(ctx, safeeyes_config, plugin_config): 'total_resets': 0, } - session = context['session']['plugin'].get('healthstats', {}) | defaults + # session = context['session']['plugin'].get('healthstats', {}) | defaults + session = context['session']['plugin'].get('healthstats', {}).copy() + session.update(defaults) # refactored to maintain compatibility with python3.8 on Ubuntu 20.04 LTS (dict | dict syntax was introduced in python3.9). if 'no_of_breaks' in session: # Ignore old format session. session = defaults