bin/pvl.hosts-dns
changeset 337 23b3c0661189
parent 335 77fb4019d4e0
child 341 82905d6bfb7a
--- a/bin/pvl.hosts-dns	Sun Dec 22 19:03:57 2013 +0200
+++ b/bin/pvl.hosts-dns	Sun Dec 22 19:21:00 2013 +0200
@@ -38,11 +38,14 @@
             label = pvl.dns.join(host, host.domain)
         elif host.domain == origin :
             label = str(host)
-        elif host.domain.endswith('.' + origin) :
+        elif host.domain and host.domain.endswith('.' + origin) :
             fqdn = pvl.dns.join(host, host.domain)
             label = fqdn[:(len(fqdn) - len(origin) - 1)]
+        elif host.domain :
+            log.debug("%s: domain %s out of zone: %s", host, host.domain, origin)
+            continue
         else :
-            log.debug("%s: domain %s out of zone: %s", host, host.domain, origin)
+            log.debug("%s: fqdn out of zone: %s", host, origin)
             continue
         
         if host.forward is None  :