]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
- Update pymod tests for the new Python script variable.
authorGeorge Thessalonikefs <yorgos@nlnetlabs.nl>
Mon, 16 Oct 2023 14:32:09 +0000 (16:32 +0200)
committerGeorge Thessalonikefs <yorgos@nlnetlabs.nl>
Mon, 16 Oct 2023 14:32:09 +0000 (16:32 +0200)
testdata/pymod.tdir/pymod.py
testdata/pymod_thread.tdir/pymod_thread.py

index 1eb7af5b16e5a3b2d993bb48ec9c048a535a8571..f1e988b39a3af592ca562f5395f94b46170bdaae 100644 (file)
 import os
 
 def init(id, cfg):
-    scripts=[]
-    s = cfg.python_script
-    while s != None:
-        scripts.append(s.str)
-        s = s.next
-    log_info("pythonmod: init called, module id is %d port: %d script: %s" % (id, cfg.port, scripts))
+    log_info("pythonmod: init called, module id is %d port: %d script: %s" % (id, cfg.port, mod_env['script']))
     return True
 
 def deinit(id):
index 30c2588758f53e23ec96d24b1af115076435ce7d..58304ab467c1c340f0ec1c57ab6007a9c0325a46 100644 (file)
@@ -37,7 +37,7 @@
 import os
 
 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):