From: Frank Brehm Date: Thu, 3 Aug 2017 16:15:37 +0000 (+0200) Subject: Cosmetics X-Git-Tag: 0.1.2~145 X-Git-Url: https://git.uhu-banane.de/?a=commitdiff_plain;h=36a848c35855ce9bc8b92e99fa087db494bd1c53;p=pixelpark%2Fadmin-tools.git Cosmetics --- diff --git a/pp_lib/config_named_app.py b/pp_lib/config_named_app.py index 4f5ebbf..eb1cfcd 100644 --- a/pp_lib/config_named_app.py +++ b/pp_lib/config_named_app.py @@ -32,7 +32,7 @@ from .common import pp, to_bool, to_bytes from .cfg_app import PpCfgAppError, PpConfigApplication -__version__ = '0.3.1' +__version__ = '0.3.2' LOG = logging.getLogger(__name__) @@ -104,7 +104,7 @@ class PpConfigNamedApp(PpConfigApplication): self.named_show_bind_version = False self.named_version2show = self.default_named_version2show - self.zones = {} + self.zones = [] description = textwrap.dedent('''\ Generation of configuration of named (the BIND 9 name daemon). @@ -425,6 +425,7 @@ class PpConfigNamedApp(PpConfigApplication): zone_name = entry['name'] zone = { + 'name': zone_name, 'account': entry['account'], 'kind': entry['kind'], 'serial': entry['serial'], @@ -454,7 +455,9 @@ class PpConfigNamedApp(PpConfigApplication): zone['canonical_name'] = uni_name - self.zones[zone_name] = zone + self.zones.append(zone) + + self.zones.sort(key=lambda x: x['canonical_name']) if self.verbose > 2: LOG.debug("Got zones:\n{}".format(pp(self.zones)))