Merge branch 'broken_stuff' into 'master'

Two broken functions found in testing.

See merge request openlp/openlp!145
This commit is contained in:
Raoul Snyman 2020-02-28 07:10:14 +00:00
commit 79734f9f76
2 changed files with 6 additions and 2 deletions

View File

@ -57,7 +57,7 @@ REPLACMENT_CHARS_MAP = str.maketrans({'\u2018': '\'', '\u2019': '\'', '\u201c':
'\u2013': '-', '\u2014': '-', '\v': '\n\n', '\f': '\n\n'})
NEW_LINE_REGEX = re.compile(r' ?(\r\n?|\n) ?')
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():

View File

@ -679,7 +679,11 @@ class Settings(QtCore.QSettings):
default_value = Settings.__default_settings__[self.group() + '/' + key]
else:
default_value = Settings.__default_settings__[key]
setting = super(Settings, self).value(key, default_value)
try:
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)
def setValue(self, key, value):