diff options
Diffstat (limited to 'ipapython/dnsutil.py')
-rw-r--r-- | ipapython/dnsutil.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/ipapython/dnsutil.py b/ipapython/dnsutil.py index a11d744d7..18141fa09 100644 --- a/ipapython/dnsutil.py +++ b/ipapython/dnsutil.py @@ -49,11 +49,13 @@ class DNSName(dns.name.Name): # instead of a dns.exception raise dns.exception.SyntaxError(e) - def __nonzero__(self): + def __bool__(self): #dns.name.from_text('@') is represented like empty tuple #we need to acting '@' as nonzero value return True + __nonzero__ = __bool__ # for Python 2 + def __copy__(self): return DNSName(self.labels) |