forked from openlp/openlp
Two broken functions found in testing.
This commit is contained in:
parent
2a8fc22886
commit
7f7ac0f20d
@ -57,7 +57,7 @@ REPLACMENT_CHARS_MAP = str.maketrans({'\u2018': '\'', '\u2019': '\'', '\u201c':
|
|||||||
'\u2013': '-', '\u2014': '-', '\v': '\n\n', '\f': '\n\n'})
|
'\u2013': '-', '\u2014': '-', '\v': '\n\n', '\f': '\n\n'})
|
||||||
NEW_LINE_REGEX = re.compile(r' ?(\r\n?|\n) ?')
|
NEW_LINE_REGEX = re.compile(r' ?(\r\n?|\n) ?')
|
||||||
WHITESPACE_REGEX = re.compile(r'[ \t]+')
|
WHITESPACE_REGEX = re.compile(r'[ \t]+')
|
||||||
INTERFACE_FILTER = re.compile('lo|loopback|docker|tun', re.IGNORECASE)
|
INTERFACE_FILTER = re.compile('^lo|loopback|docker|tun', re.IGNORECASE)
|
||||||
|
|
||||||
|
|
||||||
def get_network_interfaces():
|
def get_network_interfaces():
|
||||||
|
@ -679,7 +679,11 @@ class Settings(QtCore.QSettings):
|
|||||||
default_value = Settings.__default_settings__[self.group() + '/' + key]
|
default_value = Settings.__default_settings__[self.group() + '/' + key]
|
||||||
else:
|
else:
|
||||||
default_value = Settings.__default_settings__[key]
|
default_value = Settings.__default_settings__[key]
|
||||||
|
try:
|
||||||
setting = super(Settings, self).value(key, default_value)
|
setting = super(Settings, self).value(key, default_value)
|
||||||
|
except TypeError:
|
||||||
|
log.error(f'Setting {key} is invalid , default {default_value} used as replacement')
|
||||||
|
setting = default_value
|
||||||
return self._convert_value(setting, default_value)
|
return self._convert_value(setting, default_value)
|
||||||
|
|
||||||
def setValue(self, key, value):
|
def setValue(self, key, value):
|
||||||
|
Loading…
Reference in New Issue
Block a user