[.. snipped ..]

le dahut: I'm not sure which bit is wrong. I could
point out that traceback.print_exc () will *print*
the current exception (to stdout / stderr, not sure)
and *return* None, so your line:

   logging.debug('Error %s'%traceback.print_exc())

probably doesn't do what you want, as it will
log the string "Error None". But this may be no
more than incidental to your issue.

 >> At logon time, it can occur that wsec.LookupAccountName fails. The
 >> except statement is called but an exception is thrown as well and I get
 >> a file logon.exe.log in which I can read the traceback. And finally
 >> traceback.print_exc() returns None.
 >>
 >> Why does this produce a traceback instead of really except it ?

The fact that you're getting "logon.exe.log" suggests to me that
you're using py2exe, which has its own setup for trapping
traceback and things which go to stdout. Is this the case?

Hopefully someone else can see more clearly than I am, but
if they can't, you're going to have to come up with a *really*
small example of what does or doesn't work.

TJG
_______________________________________________
python-win32 mailing list
python-win32@python.org
http://mail.python.org/mailman/listinfo/python-win32

Reply via email to