from .cfg_app import PpCfgAppError, PpConfigApplication
-__version__ = '0.3.0'
+__version__ = '0.3.1'
LOG = logging.getLogger(__name__)
if prefix:
uni_name = 'rev.' + prefix
- match = self.re_ipv6_zone.search(zone_name)
- if match:
- prefix = self._get_ipv6_prefix(match.group(1))
- if prefix:
- uni_name = 'rev.' + prefix
+ if not uni_name:
+ match = self.re_ipv6_zone.search(zone_name)
+ if match:
+ prefix = self._get_ipv6_prefix(match.group(1))
+ if prefix:
+ uni_name = 'rev.' + prefix
if not uni_name:
uni_name = zone_name.encode('utf-8').decode('idna')
- zone['canoniical_name'] = uni_name
+ zone['canonical_name'] = uni_name
self.zones[zone_name] = zone
for t in match.split('.'):
if t:
tuples.insert(0, t)
- LOG.debug("Got IPv4 tuples: {}".format(pp(tuples)))
+ if self.verbose > 2:
+ LOG.debug("Got IPv4 tuples: {}".format(pp(tuples)))
return '.'.join(tuples)
# -------------------------------------------------------------------------
for t in match.split('.'):
if t:
tuples.insert(0, t)
- LOG.debug("Got IPv6 tuples: {}".format(pp(tuples)))
tokens = []
while len(tuples):
tokens.append(token)
del tuples[0:4]
+ if self.verbose > 2:
+ LOG.debug("Got IPv6 tokens: {}".format(pp(tokens)))
+
return ':'.join(tokens)
# =============================================================================