ud-generate: don't blow up when a host does not have IP-addresses
[mirror/userdir-ldap.git] / ud-generate
index f5279e0..3b9a627 100755 (executable)
@@ -1015,6 +1015,9 @@ def GenHosts(File):
          if IsDebianHost.match(GetAttr(x, "hostname")) is None:
             continue
 
+         if not 'ipHostNumber' in x[1]:
+            continue
+
          addrs = x[1]["ipHostNumber"]
          for addr in addrs:
             if addr not in seen: