From: Peter Palfrader Date: Tue, 22 Sep 2009 19:33:05 +0000 (+0200) Subject: ud-generate: don't blow up when a host does not have IP-addresses X-Git-Tag: userdir-ldap-0.3.72~4 X-Git-Url: https://git.adam-barratt.org.uk/?p=mirror%2Fuserdir-ldap.git;a=commitdiff_plain;h=f713c17881194c50a838b5211075abf75470c054 ud-generate: don't blow up when a host does not have IP-addresses --- diff --git a/debian/changelog b/debian/changelog index fff3f2b..c8c907e 100644 --- a/debian/changelog +++ b/debian/changelog @@ -6,8 +6,9 @@ userdir-ldap (0.3.72XX) Xnstable; urgency=low * ud-useradd: force gidNumber to be an int when we open the welcome template (it can be different when we read it from input using -n). * Tweak templates/welcome-message-60000. + * ud-generate: don't blow up when a host does not have IP-addresses. - -- Peter Palfrader Wed, 09 Sep 2009 19:29:38 +0200 + -- Peter Palfrader Tue, 22 Sep 2009 21:32:39 +0200 userdir-ldap (0.3.71) unstable; urgency=low diff --git a/ud-generate b/ud-generate index f5279e0..3b9a627 100755 --- a/ud-generate +++ b/ud-generate @@ -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: