ignore config files starting with .
This commit is contained in:
@@ -450,8 +450,11 @@ def managed_zones(config, bind_zones=[]):
|
|||||||
zone_dirs.append(cfg.zone_dir)
|
zone_dirs.append(cfg.zone_dir)
|
||||||
|
|
||||||
for file in os.listdir(cfg.config_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)
|
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
|
continue
|
||||||
|
|
||||||
name = file.removesuffix('.conf')
|
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)
|
zone = Zone(origin=name, view=view, status=status, cfgfile=cfgfile, zonefile=zonefile)
|
||||||
zones.append(zone)
|
zones.append(zone)
|
||||||
# self.zones.append(ManagedZone("test.ch", "testview", "master", "/tmp/test.conf", "/tmp/test.zone"))
|
|
||||||
return zones
|
return zones
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user