from .errors import PpError
from .obj import PpBaseObjectError, PpBaseObject
-__version__ = '0.4.1'
+__version__ = '0.4.2'
LOG = logging.getLogger(__name__)
return
self._ttl = int(value)
+ # -----------------------------------------------------------
+ @property
+ def data(self):
+ "String representation of SOA data."
+ if (self.primary and self.email and self.serial is not None and self.refresh and
+ self.retry and self.expire and self.ttl):
+ return "{_primary} {_email} {_serial} {_refresh} {_retry} {_expire} {_ttl}".format(
+ **self.__dict__)
+ else:
+ return None
+
# -------------------------------------------------------------------------
def as_dict(self, short=True):
"""
res['retry'] = self.retry
res['expire'] = self.expire
res['ttl'] = self.ttl
+ res['data'] = self.data
return res