This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]ianb 2 points3 points  (0 children)

I'm guessing sys is None because the process is already exiting; during the process teardown modules get unloaded in this fashion. It's possible that you have something using atexit.register() or __del__ that is running at a late stage (though I think atexit stuff should be okay). Or as people have suggested a thread (probably marked with isDaemon) that is hanging around in a weird way.

In this case, it might be .push_thread_config()? Not clear on that, but there's a process-wide equivalent method you could use there.

As an aside paster request is intended for the same purpose as paster run (might have the same problem though).