From 34fcf6ba5b242e0dca00f61109577b53a8ca7a21 Mon Sep 17 00:00:00 2001 From: Pablo Hoffman Date: Thu, 26 Nov 2009 18:37:45 -0200 Subject: [PATCH] Added informative message when trying to use trackref and it's not enabled --- scrapy/utils/trackref.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scrapy/utils/trackref.py b/scrapy/utils/trackref.py index 86dbc085b..a9df06946 100644 --- a/scrapy/utils/trackref.py +++ b/scrapy/utils/trackref.py @@ -34,6 +34,9 @@ if not settings.getbool('TRACK_REFS'): object_ref = object def print_live_refs(): + if object_ref is object: + print "The trackref module is disabled. Use TRACK_REFS setting to enable it." + return print "Live References" print now = time()