|
|
@@ -87,7 +87,7 @@ class DataCollector:
|
|
87
|
87
|
if not os.path.exists(cachefile):
|
|
88
|
88
|
return
|
|
89
|
89
|
print 'Loading cache...'
|
|
90
|
|
- f = open(cachefile)
|
|
|
90
|
+ f = open(cachefile, 'rb')
|
|
91
|
91
|
try:
|
|
92
|
92
|
self.cache = pickle.loads(zlib.decompress(f.read()))
|
|
93
|
93
|
except:
|
|
|
@@ -149,7 +149,7 @@ class DataCollector:
|
|
149
|
149
|
# Save cacheable data
|
|
150
|
150
|
def saveCache(self, cachefile):
|
|
151
|
151
|
print 'Saving cache...'
|
|
152
|
|
- f = open(cachefile, 'w')
|
|
|
152
|
+ f = open(cachefile, 'wb')
|
|
153
|
153
|
#pickle.dump(self.cache, f)
|
|
154
|
154
|
data = zlib.compress(pickle.dumps(self.cache))
|
|
155
|
155
|
f.write(data)
|