From 6830d904537f420811703ef1cbb2a1628c78581c Mon Sep 17 00:00:00 2001 From: François Schmidts Date: Sun, 8 Jun 2014 12:52:01 +0200 Subject: small practicity changes --- fetch.py | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 fetch.py (limited to 'fetch.py') diff --git a/fetch.py b/fetch.py old mode 100644 new mode 100755 -- cgit From 2dc45ccf35b9fb717c8e7b703eefef2b72df0360 Mon Sep 17 00:00:00 2001 From: François Schmidts Date: Sun, 8 Jun 2014 12:55:34 +0200 Subject: fix from http://stackoverflow.com/questions/8774958/keyerror-in-module-threading-after-a-successful-py-test-run --- fetch.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'fetch.py') diff --git a/fetch.py b/fetch.py index 38d1ba2f..cc3068e0 100755 --- a/fetch.py +++ b/fetch.py @@ -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 -- cgit