catch IndexError when computing IP of related hosts, fixes #190
This commit is contained in:
parent
e51d453494
commit
4906a28f31
@ -405,7 +405,7 @@ def _on_update_success(host, fqdn, kind, ipaddr, secure, logger):
|
||||
network = IPNetwork("%s/%d" % (ipaddr, netmask))
|
||||
rh_ipaddr = str(IPAddress(network.network) + int(ifid))
|
||||
rh_fqdn = FQDN(rh.name + '.' + fqdn.host, fqdn.domain)
|
||||
except AddrFormatError as e:
|
||||
except (IndexError, AddrFormatError) as e:
|
||||
logger.warning("trouble computing address of related host %s [%s]" % (rh, e))
|
||||
else:
|
||||
logger.info("updating related host %s -> %s" % (rh_fqdn, rh_ipaddr))
|
||||
|
Loading…
x
Reference in New Issue
Block a user