From d257e70f40ae7b86b0f9fb7e20233d5fc5f3bf38 Mon Sep 17 00:00:00 2001 From: mitaa Date: Sat, 5 Sep 2020 12:01:33 +0200 Subject: [PATCH] Fix profile saving unsupported options --- oversteer/profiles.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/oversteer/profiles.py b/oversteer/profiles.py index d210de7..a5b8b4c 100644 --- a/oversteer/profiles.py +++ b/oversteer/profiles.py @@ -5,7 +5,10 @@ class Profile: def __init__(self, data = None): self.config = configparser.ConfigParser() if data is not None: - self.import_settings(data) + self.import_settings(dict(filter( + lambda item: item[1] is not None, + data.items() + ))) def load(self, profile_file): self.config = configparser.ConfigParser()