--- a/bin/pvl.hosts-forward Thu Feb 26 15:23:00 2015 +0200
+++ b/bin/pvl.hosts-forward Thu Feb 26 15:25:09 2015 +0200
@@ -31,9 +31,13 @@
hosts = pvl.hosts.apply(options, args)
# process
- for rr in pvl.hosts.zone.apply_hosts_forward(options, hosts, options.forward_zone):
- print unicode(rr)
-
+ try:
+ for rr in pvl.hosts.zone.apply_hosts_forward(options, hosts, options.forward_zone):
+ print unicode(rr)
+ except pvl.hosts.HostError as error:
+ log.error("%s", error)
+ return 3
+
return 0
if __name__ == '__main__':