summaryrefslogtreecommitdiff
path: root/pythonmod/examples
diff options
context:
space:
mode:
authorCy Schubert <cy@FreeBSD.org>2023-11-13 19:44:16 +0000
committerCy Schubert <cy@FreeBSD.org>2023-11-13 19:44:16 +0000
commit16fd0b24910488e59ca1941387b9ac7fb646a837 (patch)
tree2cec66ecd6a6986811db8d82dc14d2c054e37e49 /pythonmod/examples
parent292d51198aa319c58f534549851e9c28486abdf4 (diff)
Diffstat (limited to 'pythonmod/examples')
-rw-r--r--pythonmod/examples/edns.py2
-rw-r--r--pythonmod/examples/inplace_callbacks.py2
-rw-r--r--pythonmod/examples/log.py2
3 files changed, 3 insertions, 3 deletions
diff --git a/pythonmod/examples/edns.py b/pythonmod/examples/edns.py
index ddcccc51c9bd..4e2eebd4fd1d 100644
--- a/pythonmod/examples/edns.py
+++ b/pythonmod/examples/edns.py
@@ -80,7 +80,7 @@ def init_standard(id, env):
..note:: The previously accessible configuration options can now be found in
env.cfg.
"""
- log_info("python: inited script {}".format(env.cfg.python_script))
+ log_info("python: inited script {}".format(mod_env['script']))
# Register EDNS option 65001 as a known EDNS option.
if not register_edns_option(env, 65001, bypass_cache_stage=True,
diff --git a/pythonmod/examples/inplace_callbacks.py b/pythonmod/examples/inplace_callbacks.py
index e1caaecc74e7..42806daa107a 100644
--- a/pythonmod/examples/inplace_callbacks.py
+++ b/pythonmod/examples/inplace_callbacks.py
@@ -287,7 +287,7 @@ def init_standard(id, env):
env.cfg.
"""
- log_info("python: inited script {}".format(env.cfg.python_script))
+ log_info("python: inited script {}".format(mod_env['script']))
# Register the inplace_reply_callback function as an inplace callback
# function when answering a resolved query.
diff --git a/pythonmod/examples/log.py b/pythonmod/examples/log.py
index c17106b0f268..03f741962644 100644
--- a/pythonmod/examples/log.py
+++ b/pythonmod/examples/log.py
@@ -87,7 +87,7 @@ def logDnsMsg(qstate):
print "-"*100
def init(id, cfg):
- log_info("pythonmod: init called, module id is %d port: %d script: %s" % (id, cfg.port, cfg.python_script))
+ log_info("pythonmod: init called, module id is %d port: %d script: %s" % (id, cfg.port, mod_env['script']))
return True
def deinit(id):