mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2024-12-24 08:00:02 -06:00
Log errors from backup_and_replace hostname to logger
Without logging errors to logger is hard to debug issue from logfile. https://fedorahosted.org/freeipa/ticket/5794 Reviewed-By: David Kupka <dkupka@redhat.com>
This commit is contained in:
parent
d3ac5125ce
commit
5e10b2eed2
@ -332,8 +332,11 @@ class RedHatTaskNamespace(BaseTaskNamespace):
|
||||
try:
|
||||
self.set_hostname(hostname)
|
||||
except ipautil.CalledProcessError as e:
|
||||
print(("Failed to set this machine hostname to "
|
||||
"%s (%s)." % (hostname, str(e))), file=sys.stderr)
|
||||
root_logger.debug(traceback.format_exc())
|
||||
root_logger.error(
|
||||
"Failed to set this machine hostname to %s (%s).",
|
||||
old_hostname, e
|
||||
)
|
||||
|
||||
filepath = paths.ETC_HOSTNAME
|
||||
if os.path.exists(filepath):
|
||||
|
Loading…
Reference in New Issue
Block a user