From 25d04f4cbc8e469e9c0f4cd06ad1cf6d07fcd6ab Mon Sep 17 00:00:00 2001 From: Jakob Ketterl Date: Mon, 26 Apr 2021 21:27:15 +0200 Subject: [PATCH] exclude keys that have been moved to openwebrx.conf --- owrx/config/commands.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/owrx/config/commands.py b/owrx/config/commands.py index efcaf31..153ca78 100644 --- a/owrx/config/commands.py +++ b/owrx/config/commands.py @@ -4,13 +4,21 @@ from owrx.bookmarks import Bookmarks class MigrateCommand(Command): + # these keys have been moved to openwebrx.conf + blacklisted_keys = [ + "temporary_directory", + "web_port", + "aprs_symbols_path", + ] + def run(self, args): print("Migrating configuration...") config = Config.get() # a key that is set will end up in the DynamicConfig, so this will transfer everything there for key, value in config.items(): - config[key] = value + if key not in MigrateCommand.blacklisted_keys: + config[key] = value config.store() print("Migrating bookmarks...")