Two python modules

Poltorak, Paul (CT DD DS EVO O BFD TM&ISEC 1) Paul.Poltorak at evosoft.com
Thu Nov 10 08:53:21 CET 2016


Hello all,

using source FR from github on SLES 12 SP1.
I would like to use two python modules.
Python with only one module is working fine.
Now I just added "python two" and place the two.py into the same place as one.py but get following error message.
Looks like for the second module the python path is not taken.
I've tested with exported python path and integrated into the config file.

Thu Nov 10 08:48:19 2016 : Info: Python version: 2.7.9 (default, Dec 21 2014, 11:02:59) [GCC]
Thu Nov 10 08:48:19 2016 : Debug:   # Instantiating module "two" from file /usr/local/etc/raddb/mods-enabled/python
Thu Nov 10 08:48:19 2016 : Error: python_function_load - Module 'two' not found
Thu Nov 10 08:48:19 2016 : Error: <type 'exceptions.SystemError'> (null argument to internal routine)
Thu Nov 10 08:48:19 2016 : Error: python_function_load - Failed to import python function 'two.auth'
Thu Nov 10 08:48:19 2016 : Error: /usr/local/etc/raddb/mods-enabled/python[20]: Instantiation failed for module "two"

EXPORT -> declare -x PYTHONPATH="/usr/local/etc/raddb/mods-config/python:/usr/lib64/python2.7:/usr/lib64/python2.7/site-packages:/usr/lib64/python2.7/lib-dynload"

python one{
#        python_path="/usr/local/etc/raddb/mods-config/python/:/usr/lib64/python2.7/:/usr/lib64/python2.7/site-packages/:/usr/lib64/python2.7/lib-dynload/"
        module = one

        mod_authorize = ${.module}
        func_authorize = authorize

        mod_post_auth = ${.module}
        func_post_auth = post_auth
}

python two{
#        python_path="/usr/local/etc/raddb/mods-config/python/:/usr/lib64/python2.7/:/usr/lib64/python2.7/site-packages/:/usr/lib64/python2.7/lib-dynload/"
        module = two

        mod_authorize = ${.module}
        func_authorize = auth
}

Hope someone could help me
Thanks in advance!

Best Regards,
Paul



More information about the Freeradius-Users mailing list