mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-03-18 09:10:49 +00:00
formatting strings: %s automatically applies the str() method
This commit is contained in:
parent
d27c3f69d1
commit
e1440a5ee5
@ -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:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user