investigate python auth problem
david at hlacik.eu
Sat Jun 7 09:35:23 UTC 2008
Hello , of course i am importing without .py . I have checked all paths with
sys.path and also check if INN is using same python version with same
environment as mine - and yes it is.
What i have discovered is that nnrpd_auth.py has a really problem with
importing anything except builtin sys module.
Module ldap is not working, module commands is not working ... it will
simple print no result ...
When i test it trought my test script it will does. When i test it directly
with INN i see only "python auth returned wrong result".
When i try to investigate that with try except Exception .. i simple see no
error there but null result ... it will simple not call the result... even
simple commands.getoutput("ls -l") does not work! :(
Only one solution i have found is to import sys module and call popen to
open external script .. also writen in python .. which will simple to
standart out return result (and which is using module ldap without problem)
.. and then i read output in nnrpd_auth and work with that.
Such ugly think , i spent 3 days working with nnrpd_auth.py and nothing
worked as i wanted (and i am programming in python for 3 years actually so i
dont think i am lame ).
Thanks! and if someone really will help me to investigate problem i will
sent them a package of Czech Beers (Gambrinus,Plzen or Budvar) as i am live
in czech republic!
On Fri, Jun 6, 2008 at 8:27 PM, Julien ÉLIE <julien at trigofacile.com> wrote:
> Hi David (thrice),
> I have created own try, except part to see error, but all i got is :
>> Error: No module named py
>> I want to know more , i want to know why? There is no other info in logs.
> Do you "import module.py" or "import module"? The last one is the right
> thing to do
> inside your scripts. Also check whether paths are correct.
> And in readers.conf, did you try without ".py" too in the python_auth:
> (I do not know whether it is required.)
> Julien ÉLIE
> « Mon père, ce héros au sourire si doux. » (Victor Hugo)
More information about the inn-workers