mirror of
https://github.com/NLnetLabs/unbound.git
synced 2026-08-24 00:22:29 +02:00
- Expose the script filename in the Python module environment 'mod_env'
instead of the config_file structure which includes the linked list of scripts in a multi Python module setup; fixes #79.
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user