Commits

Brent Tubbs committed da15840

move monkeypatch before pymongo import

Comments (0)

Files changed (1)

 
 from gevent.pywsgi import WSGIServer
 from gevent import monkey
+
+# monkeypatch all socket things before importing pymongo.
+monkey.patch_all()
+
 import pymongo
 import gridfs
 import yaml
 
 
 def main():
-    monkey.patch_all()
 
     read_config()