Made NSHost objects accept NSZone objects (or Zone ID's) for all operations
1 files changed, 3 insertions(+), 1 deletions(-) M zerigodns/api.py
M zerigodns/api.py +3 -1
@@ 389,7 389,8 @@ class NSHost(ZerigoDNS): return host def find_all(self, zone_id, opts={}): - opts['zone_id'] = zone_id + opts['zone_id'] = \ + zone_id.id if isinstance(zone_id, NSZone) else zone_id return self.hosts(opts=opts) def hosts(self, opts={}): @@ 408,6 409,7 @@ class NSHost(ZerigoDNS): ] def find(self, id, zone_id): + zone_id = zone_id.id if isinstance(zone_id, NSZone) else zone_id host = NSHost( self.user, self.key,