Define better warning facility.
This commit is contained in:
parent
01ca5910ec
commit
c63ab44c9c
6 changed files with 68 additions and 17 deletions
|
|
@ -45,7 +45,7 @@ def resolve_target_host_name(host):
|
|||
log.debug("derived host_name for host \"{}\": {}".format(
|
||||
host, host_name))
|
||||
except (socket.gaierror, socket.herror) as e:
|
||||
log.warn("Could not derive host_name for {}"
|
||||
log.warning("Could not derive host_name for {}"
|
||||
", $host_name will be empty. Error is: {}".format(host, e))
|
||||
# in case of error provide empty value
|
||||
host_name = ''
|
||||
|
|
@ -59,7 +59,7 @@ def resolve_target_fqdn(host):
|
|||
log.debug("derived host_fqdn for host \"{}\": {}".format(
|
||||
host, host_fqdn))
|
||||
except socket.herror as e:
|
||||
log.warn("Could not derive host_fqdn for {}"
|
||||
log.warning("Could not derive host_fqdn for {}"
|
||||
", $host_fqdn will be empty. Error is: {}".format(host, e))
|
||||
# in case of error provide empty value
|
||||
host_fqdn = ''
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue