I had some code that worked with Crypto and wasn't initially
compatible with uwsgi...

the fix was to call Crypto.Random's atfork() . thankfully uwsgi has a
post_fork_hook that made this simple

I don't always run under uwsgi though.  does the implementation I used
below look okay - or does anyone know of a more pyramid-esque method ?


myapp/__init__.py
==============
try:
    import uwsgi
    from Crypto.Random import atfork
    def post_fork_hook():
        atfork()
    uwsgi.post_fork_hook = post_fork_hook
except:
    pass
==============

-- 
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en.

Reply via email to