diff --git a/electrum/commands.py b/electrum/commands.py index 72a590fde..2cfbaeb1d 100644 --- a/electrum/commands.py +++ b/electrum/commands.py @@ -1171,6 +1171,7 @@ def add_global_options(parser): def add_wallet_option(parser): parser.add_argument("-w", "--wallet", dest="wallet_path", help="wallet path") + parser.add_argument("--forgetconfig", action="store_true", dest="forget_config", default=False, help="Forget config on exit") def get_parser(): # create main parser diff --git a/electrum/simple_config.py b/electrum/simple_config.py index 38c814fbc..f55cf468f 100644 --- a/electrum/simple_config.py +++ b/electrum/simple_config.py @@ -226,6 +226,8 @@ class SimpleConfig(Logger): return key not in self.cmdline_options def save_user_config(self): + if self.get('forget_config'): + return if not self.path: return path = os.path.join(self.path, "config")