mirror of
https://github.com/NLnetLabs/unbound.git
synced 2026-08-24 16:42: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:
@@ -952,6 +952,7 @@ struct config_str2list {
|
||||
/* ************************************************************************************ *
|
||||
Structure config_file
|
||||
* ************************************************************************************ */
|
||||
%ignore config_file::python_script;
|
||||
struct config_file {
|
||||
int verbosity;
|
||||
int stat_interval;
|
||||
@@ -1035,6 +1036,13 @@ struct config_file {
|
||||
struct config_strlist* python_script;
|
||||
};
|
||||
|
||||
%extend config_file {
|
||||
%pythoncode %{
|
||||
def _deprecated_python_script(self): return "cfg.python_script is deprecated, you can use `mod_env['script']` instead."
|
||||
python_script = property(_deprecated_python_script)
|
||||
%}
|
||||
}
|
||||
|
||||
/* ************************************************************************************ *
|
||||
ASN: Adding structures related to forwards_lookup and dns_cache_find_delegation
|
||||
* ************************************************************************************ */
|
||||
|
||||
Reference in New Issue
Block a user