diff options
author | François Schmidts <francois.schmidts@gmail.com> | 2014-06-08 12:55:34 +0200 |
---|---|---|
committer | François Schmidts <francois.schmidts@gmail.com> | 2014-06-08 12:55:34 +0200 |
commit | 2dc45ccf35b9fb717c8e7b703eefef2b72df0360 (patch) | |
tree | 70876c94852e9a645ed59a89f679c515cdc25d36 | |
parent | fixing crash when logging with nonexisting user (diff) | |
download | newspipe-2dc45ccf35b9fb717c8e7b703eefef2b72df0360.tar.gz newspipe-2dc45ccf35b9fb717c8e7b703eefef2b72df0360.tar.bz2 newspipe-2dc45ccf35b9fb717c8e7b703eefef2b72df0360.zip |
fix from
http://stackoverflow.com/questions/8774958/keyerror-in-module-threading-after-a-successful-py-test-run
-rwxr-xr-x | fetch.py | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -6,8 +6,11 @@ # You can use this script with cron, for example: # */30 * * * * cd ~/.pyaggr3g470r/ ; python fetch.py # to fetch articles every 30 minutes. - import sys +if 'threading' in sys.modules: + raise Exception('threading module loaded before patching!') +import gevent.monkey +gevent.monkey.patch_thread() from pyaggr3g470r import crawler from pyaggr3g470r.models import User |