dimagi/pillowtop — pull request #35 by snopoke (2013-05-28 12:16:01+00:00)
Title: prevent gevent patch from being applied unnecessarily

Prevent this error when running pydev in muliproc mode:

Exception in thread pydevd.CheckAliveThread:
Traceback (most recent call last):
File "/usr/lib/python2.7/threading.py", line 551, in __bootstrap_inner
self.run()
File "/home/simon/dev/pycharm-2.7.2/helpers/pydev/pydevd_comm.py", line 252, in run
self.OnRun()
File "/home/simon/dev/pycharm-2.7.2/helpers/pydev/pydevd.py", line 181, in OnRun
time.sleep(0.3)
File "/home/simon/.virtualenvs/commcarehq/local/lib/python2.7/site-packages/gevent/hub.py", line 79, in sleep
switch_result = get_hub().switch()
File "/home/simon/.virtualenvs/commcarehq/local/lib/python2.7/site-packages/gevent/hub.py", line 135, in get_hub
raise NotImplementedError('gevent is only usable from a single thread')
NotImplementedError: gevent is only usable from a single thread