Commit aa29af76 authored by segfault's avatar segfault

Greeter: Fix debug message formatting

parent 46798ffd
......@@ -48,7 +48,7 @@ class AdminSetting(object):
try:
settings = read_settings(self.settings_file)
except FileNotFoundError:
raise SettingNotFoundError("No persistent admin settings file found (path: %s)", self.settings_file)
raise SettingNotFoundError("No persistent admin settings file found (path: %s)" % self.settings_file)
if settings.get('TAILS_USER_PASSWORD') is None:
raise SettingNotFoundError("No admin password setting found in settings file (path: %s)", self.settings_file)
raise SettingNotFoundError("No admin password setting found in settings file (path: %s)" % self.settings_file)
......@@ -28,11 +28,11 @@ class FormatsSetting(LocalizationSetting):
try:
settings = read_settings(self.settings_file)
except FileNotFoundError:
raise SettingNotFoundError("No persistent formats settings file found (path: %s)", self.settings_file)
raise SettingNotFoundError("No persistent formats settings file found (path: %s)" % self.settings_file)
formats = settings.get('TAILS_FORMATS')
if formats is None:
raise SettingNotFoundError("No formats setting found in settings file (path: %s)", self.settings_file)
raise SettingNotFoundError("No formats setting found in settings file (path: %s)" % self.settings_file)
is_default = settings.get('IS_DEFAULT') == 'true'
logging.debug("Loaded formats setting '%s' (is default: %s)", formats, is_default)
......
......@@ -41,11 +41,11 @@ class KeyboardSetting(LocalizationSetting):
try:
settings = read_settings(self.settings_file)
except FileNotFoundError:
raise SettingNotFoundError("No persistent keyboard settings file found (path: %s)", self.settings_file)
raise SettingNotFoundError("No persistent keyboard settings file found (path: %s)" % self.settings_file)
keyboard_layout = settings.get('TAILS_XKBLAYOUT')
if keyboard_layout is None:
raise SettingNotFoundError("No keyboard setting found in settings file (path: %s)", self.settings_file)
raise SettingNotFoundError("No keyboard setting found in settings file (path: %s)" % self.settings_file)
keyboard_variant = settings.get('TAILS_XKBVARIANT')
if keyboard_variant:
......
......@@ -57,11 +57,11 @@ class LanguageSetting(LocalizationSetting):
try:
settings = read_settings(self.settings_file)
except FileNotFoundError:
raise SettingNotFoundError("No persistent language settings file found (path: %s)", self.settings_file)
raise SettingNotFoundError("No persistent language settings file found (path: %s)" % self.settings_file)
language = settings.get('TAILS_LOCALE_NAME')
if language is None:
raise SettingNotFoundError("No language setting found in settings file (path: %s)", self.settings_file)
raise SettingNotFoundError("No language setting found in settings file (path: %s)" % self.settings_file)
is_default = settings.get('IS_DEFAULT') == 'true'
logging.debug("Loaded language setting '%s' (is default: %s)", language, is_default)
......
......@@ -21,11 +21,11 @@ class MacSpoofSetting(object):
try:
settings = read_settings(self.settings_file)
except FileNotFoundError:
raise SettingNotFoundError("No persistent macspoof settings file found (path: %s)", self.settings_file)
raise SettingNotFoundError("No persistent macspoof settings file found (path: %s)" % self.settings_file)
value_str = settings.get('TAILS_MACSPOOF_ENABLED')
if value_str is None:
raise SettingNotFoundError("No macspoof setting found in settings file (path: %s)", self.settings_file)
raise SettingNotFoundError("No macspoof setting found in settings file (path: %s)" % self.settings_file)
value = value_str == "true"
logging.debug("Loaded macspoof setting '%s'", value)
......
......@@ -29,7 +29,7 @@ class NetworkSetting(object):
value = settings.get('TAILS_NETCONF')
if value is None:
raise SettingNotFoundError("No network setting found in settings file (path: %s)", self.settings_file)
raise SettingNotFoundError("No network setting found in settings file (path: %s)" % self.settings_file)
logging.debug("Loaded network setting '%s'", value)
return value
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment