diff --git a/lib/core/option.py b/lib/core/option.py index fd2170c14..52ffeeb46 100644 --- a/lib/core/option.py +++ b/lib/core/option.py @@ -107,6 +107,7 @@ from lib.core.settings import DEFAULT_PAGE_ENCODING from lib.core.settings import DEFAULT_TOR_HTTP_PORTS from lib.core.settings import DEFAULT_TOR_SOCKS_PORT from lib.core.settings import DUMMY_URL +from lib.core.settings import IGNORE_SAVE_OPTIONS from lib.core.settings import INJECT_HERE_MARK from lib.core.settings import IS_WIN from lib.core.settings import KB_CHARS_BOUNDARY_CHAR @@ -1995,6 +1996,9 @@ def _saveCmdline(): if datatype and isListLike(datatype): datatype = datatype[0] + if option in IGNORE_SAVE_OPTIONS: + value = None + if value is None: if datatype == OPTION_TYPE.BOOLEAN: value = "False" diff --git a/lib/core/settings.py b/lib/core/settings.py index 325855514..d92e443d4 100644 --- a/lib/core/settings.py +++ b/lib/core/settings.py @@ -386,6 +386,9 @@ CODECS_LIST_PAGE = "http://docs.python.org/library/codecs.html#standard-encoding # Simple regular expression used to distinguish scalar from multiple-row commands (not sole condition) SQL_SCALAR_REGEX = r"\A(SELECT(?!\s+DISTINCT\(?))?\s*\w*\(" +# Option/switch values to ignore during configuration save +IGNORE_SAVE_OPTIONS = ("saveCmdline",) + # IP address of the localhost LOCALHOST = "127.0.0.1"