X-Git-Url: https://git.ralfj.de/zonemaker.git/blobdiff_plain/d1f1548719487b0107be8befe090483401abbe52..68f7e70558cf818f97f0bcb0ea80994d4abc5a71:/zone-maker diff --git a/zone-maker b/zone-maker index 57f8afe..336a710 100755 --- a/zone-maker +++ b/zone-maker @@ -1,7 +1,7 @@ #!/usr/bin/python3 import sys, os from zonemaker.zone import Zone -from typing import Sequence +import typing def load_module(name, path, write_bytecode = False): import importlib.machinery @@ -13,9 +13,8 @@ def load_module(name, path, write_bytecode = False): def make_zone(filename: str) -> None: zonefile = load_module(os.path.basename(filename), filename) - zones = zonefile.__zones__ # type: Sequence[Zone] - for zone in zones: - zone.write() + zone = zonefile.__zone__ # type: Zone + zone.write() if __name__ == "__main__": for name in sys.argv[1:]: