From 32f13431c2b829aa3c963786db49e7be13dd42fa Mon Sep 17 00:00:00 2001 From: embar- Date: Thu, 17 Oct 2024 20:51:36 +0300 Subject: [PATCH] Fix "|" usage for dict for older Python compatibility --- safeeyes/plugins/healthstats/plugin.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/safeeyes/plugins/healthstats/plugin.py b/safeeyes/plugins/healthstats/plugin.py index d4def48..5f97afe 100644 --- a/safeeyes/plugins/healthstats/plugin.py +++ b/safeeyes/plugins/healthstats/plugin.py @@ -55,7 +55,8 @@ def init(ctx, safeeyes_config, plugin_config): 'total_resets': 0, } - session = context['session']['plugin'].get('healthstats', {}) or defaults + session = context['session']['plugin'].get('healthstats', {}).copy() + session.update(defaults) if 'no_of_breaks' in session: # Ignore old format session. session = defaults