1
0
mirror of https://github.com/slgobinath/SafeEyes.git synced 2025-01-06 01:26:56 +01:00

Fix "|" usage for dict for older Python compatibility

This commit is contained in:
embar- 2024-10-17 20:51:36 +03:00 committed by GitHub
parent a52eb0a0ed
commit 32f13431c2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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