aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--python/sandcrawler/workers.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/python/sandcrawler/workers.py b/python/sandcrawler/workers.py
index 9f1b55c..96aef3f 100644
--- a/python/sandcrawler/workers.py
+++ b/python/sandcrawler/workers.py
@@ -69,10 +69,10 @@ class SandcrawlerWorker(object):
self.counts['timeout'] += 1
resp = self.timeout_response(task) # pylint: disable=assignment-from-none
# TODO: what if it is this push_record() itself that is timing out?
- if self.sink:
+ if resp and self.sink:
self.sink.push_record(resp)
self.counts['pushed'] += 1
- else:
+ elif resp:
print(json.dumps(resp))
finally:
signal.alarm(0)