Minor fix (reported over ML - ignore saving of conf.saveCmdline)

This commit is contained in:
Miroslav Stampar 2015-08-13 17:21:36 +02:00
parent 8ea8b168b1
commit 2c1cde0f59
2 changed files with 7 additions and 0 deletions

View File

@ -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_HTTP_PORTS
from lib.core.settings import DEFAULT_TOR_SOCKS_PORT from lib.core.settings import DEFAULT_TOR_SOCKS_PORT
from lib.core.settings import DUMMY_URL 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 INJECT_HERE_MARK
from lib.core.settings import IS_WIN from lib.core.settings import IS_WIN
from lib.core.settings import KB_CHARS_BOUNDARY_CHAR from lib.core.settings import KB_CHARS_BOUNDARY_CHAR
@ -1995,6 +1996,9 @@ def _saveCmdline():
if datatype and isListLike(datatype): if datatype and isListLike(datatype):
datatype = datatype[0] datatype = datatype[0]
if option in IGNORE_SAVE_OPTIONS:
value = None
if value is None: if value is None:
if datatype == OPTION_TYPE.BOOLEAN: if datatype == OPTION_TYPE.BOOLEAN:
value = "False" value = "False"

View File

@ -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) # Simple regular expression used to distinguish scalar from multiple-row commands (not sole condition)
SQL_SCALAR_REGEX = r"\A(SELECT(?!\s+DISTINCT\(?))?\s*\w*\(" 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 # IP address of the localhost
LOCALHOST = "127.0.0.1" LOCALHOST = "127.0.0.1"