from __future__ import absolute_import
# Standard modules
-import sys
-import os
import logging
import copy
import re
import datetime
-import json
# Third party modules
# Own modules
-from .common import pp, compare_fqdn, to_bytes, to_utf8, to_str
+from .common import pp, compare_fqdn, to_utf8, to_str
-from .errors import PpError
from .obj import PpBaseObjectError, PpBaseObject
-__version__ = '0.4.4'
+__version__ = '0.4.5'
LOG = logging.getLogger(__name__)
# -------------------------------------------------------------------------
def __init__(
self, appname=None, verbose=0, version=__version__, base_dir=None, initialized=None,
- content=None, disabled=False):
+ content=None, disabled=False):
self._content = content
self._disabled = False
self.ttl = ttl
if (self.primary and self.email and self.serial is not None and self.refresh and
- self.retry and self.expire and self.ttl):
+ self.retry and self.expire and self.ttl):
self.initialized = True
else:
self.initialized = False
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):
+ self.retry and self.expire and self.ttl):
return "{_primary} {_email} {_serial} {_refresh} {_retry} {_expire} {_ttl}".format(
**self.__dict__)
else:
# -------------------------------------------------------------------------
def __init__(
- self, appname=None, verbose=0, version=__version__, base_dir=None, initialized=None):
+ self, appname=None, verbose=0, version=__version__,
+ base_dir=None, initialized=None):
-# { 'comments': [],
-# 'name': 'www.bmwi.tv.',
-# 'records': [{'content': '77.74.236.5', 'disabled': False}],
-# 'ttl': 3600,
-# 'type': 'A'},
+ # { 'comments': [],
+ # 'name': 'www.bmwi.tv.',
+ # 'records': [{'content': '77.74.236.5', 'disabled': False}],
+ # 'ttl': 3600,
+ # 'type': 'A'},
self.comments = []
self._name = None
# -------------------------------------------------------------------------
@classmethod
def init_from_dict(
- cls, data, appname=None, verbose=0, version=__version__, base_dir=None, initialized=None):
+ cls, data, appname=None, verbose=0, version=__version__,
+ base_dir=None, initialized=None):
if not isinstance(data, dict):
- raise PdnsApiRecordError("Given data {!r} is not a dict object.".format(data))
+ raise PdnsApiRrsetError("Given data {!r} is not a dict object.".format(data))
params = {
'appname': appname,