diff --git a/CHANGELOG.md b/CHANGELOG.md index eab2dcf..6f5e2ba 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,15 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/) and this project adheres to [Semantic Versioning](https://semver.org/). +# 0.3.2 - 2021-01-30 +## Added + +## Fixed +- Variables were superglobal (global over all zones), instead of local + +## Changed + + # 0.3.1 - 2021-01-30 ## Added diff --git a/dnstemple/__init__.py b/dnstemple/__init__.py index 9bcc2bb..bba3c5b 100755 --- a/dnstemple/__init__.py +++ b/dnstemple/__init__.py @@ -114,8 +114,9 @@ def expand_include(filename, line, config): args = line.split() if len(args) < 2: exit(f"Format mismatch `$ADDRESS [=…]` in {filename}: {line}") - # Add arguments to copy of config + # Add arguments to copy of config variables (partial deep copy) config = dict(config) + config['variables'] = dict(config['variables']) for arg in args[2:]: (key, value) = arg.split('=') config['variables'][key] = value @@ -153,8 +154,8 @@ def process(filename, config): output.append(line) else: if expect_name and line[0] in ' \t': - sys.stderr.write(f"WARNING: Line may have undefined name" - " in {filename}: {line}\n") + sys.stderr.write("WARNING: Line may have undefined name" + f" in {filename}: {line}\n") output.append(line) expect_name = False return output diff --git a/dnstemple/version.py b/dnstemple/version.py index 64a0641..9cd79b5 100644 --- a/dnstemple/version.py +++ b/dnstemple/version.py @@ -1 +1 @@ -VERSION = '0.3.1' +VERSION = '0.3.2'