mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-11-29 08:25:10 +00:00
formatting strings: %s automatically applies the str() method
This commit is contained in:
1 parent
d27c3f69d1
commit
e1440a5ee5
1 file changed
+2
-2
@@ -136,7 +136,7 @@ def _apply_changes(request, old_status, new_status):
|
||||
set_hostname(new_status['hostname'])
|
||||
except Exception as exception:
|
||||
messages.error(request, _('Error setting hostname: %s') %
|
||||
str(exception))
|
||||
exception)
|
||||
else:
|
||||
messages.success(request, _('Hostname set'))
|
||||
else:
|
||||
@@ -147,7 +147,7 @@ def _apply_changes(request, old_status, new_status):
|
||||
actions.superuser_run('timezone-change', [new_status['time_zone']])
|
||||
except Exception as exception:
|
||||
messages.error(request, _('Error setting time zone: %s') %
|
||||
str(exception))
|
||||
exception)
|
||||
else:
|
||||
messages.success(request, _('Time zone set'))
|
||||
else:
|
||||
|
||||
Reference in new issue
Block a user