aboutsummaryrefslogtreecommitdiff
path: root/tools/shared.py
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2012-11-19 14:46:02 +0100
committerAlon Zakai <alonzakai@gmail.com>2012-11-21 20:47:01 +0100
commite4aa21f08ab91749ec2e7b3a22a3200bae6c8512 (patch)
tree300747067b1676100cf66c549e92fdf13eb9fdea /tools/shared.py
parent8fce64dd18afaa0c49fb59cf161fa2fadeac6e7a (diff)
fix and test pre caching
Diffstat (limited to 'tools/shared.py')
-rw-r--r--tools/shared.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/tools/shared.py b/tools/shared.py
index 18c3cea7..83c837c8 100644
--- a/tools/shared.py
+++ b/tools/shared.py
@@ -1183,17 +1183,17 @@ class JCache:
if not os.path.exists(cachename): return
data = cPickle.Unpickler(open(cachename, 'rb')).load()
if len(data) != 2:
- if DEBUG: print >> sys.stderr, 'jcache error in get'
+ #if DEBUG: print >> sys.stderr, 'jcache error in get'
return
oldkeys = data[0]
if len(oldkeys) != len(keys):
- if DEBUG: print >> sys.stderr, 'jcache collision (a)'
+ #if DEBUG: print >> sys.stderr, 'jcache collision (a)'
return
for i in range(len(oldkeys)):
if oldkeys[i] != keys[i]:
- if DEBUG: print >> sys.stderr, 'jcache collision (b)'
+ #if DEBUG: print >> sys.stderr, 'jcache collision (b)'
return
- if DEBUG: print >> sys.stderr, 'jcache win'
+ #if DEBUG: print >> sys.stderr, 'jcache win'
return data[1]
# Sets the cached value for a key (from get_key)