diff --git a/dnsmgr/__init__.py b/dnsmgr/__init__.py index e242a55..b9c4198 100644 --- a/dnsmgr/__init__.py +++ b/dnsmgr/__init__.py @@ -450,8 +450,11 @@ def managed_zones(config, bind_zones=[]): zone_dirs.append(cfg.zone_dir) for file in os.listdir(cfg.config_dir): + if file.startswith('.') or not file.endswith('.conf'): + continue + cfgfile = os.path.join(cfg.config_dir, file) - if not file.endswith('.conf') or not os.path.isfile(cfgfile): + if not os.path.isfile(cfgfile): continue name = file.removesuffix('.conf') @@ -470,7 +473,7 @@ def managed_zones(config, bind_zones=[]): zone = Zone(origin=name, view=view, status=status, cfgfile=cfgfile, zonefile=zonefile) zones.append(zone) - # self.zones.append(ManagedZone("test.ch", "testview", "master", "/tmp/test.conf", "/tmp/test.zone")) + return zones