Bugzilla – Bug 481
unbound-python module bug
Last modified: 2013-04-18 15:33:41 CEST
yes, we want use python module for some special function but we find it difficult to communicate with unbound-control, because all variables that can keep our private data are None, so can you give me some advises?
print mod_env.fname # Print module script name
mod_env.data = "test" # Store global module data
above code was wrong, because mod_env was None, and exception as follows
>>>>>> AttributeError: 'NoneType' object has no attribute 'fname'
above code find in >>>>>>>http://unbound.net/documentation/pythonmod/examples/example0.html
function: operate(id, event, qstate, qdata)
why no data pass to python module because qdata was always None
why inform_super(id, qstate, superqstate, qdata) function not execute, and how or when can i active it ?
Fixed the mod_env in example0, thank you.
The qdata is where you can store your data. The inform_super function is called when a substate informs its superstate.
Questions about the python API are more appropriate for the unbound users mailing list, you can find it here:
This issue is believed to be fixed.
Best regards, Wouter