Revision: 6753 Author: nicdumz Date: 2009-04-29 21:41:21 +0000 (Wed, 29 Apr 2009)
Log Message: ----------- Do not keep the diskcache file opened in write mode: once data has been read, we only need to read from that file.
Modified Paths: -------------- trunk/pywikipedia/diskcache.py
Modified: trunk/pywikipedia/diskcache.py =================================================================== --- trunk/pywikipedia/diskcache.py 2009-04-29 21:39:55 UTC (rev 6752) +++ trunk/pywikipedia/diskcache.py 2009-04-29 21:41:21 UTC (rev 6753) @@ -58,6 +58,9 @@ self.cache_file.write('%02x%s%06x%s' % (len(key), key, len(value), value))
self.lookup = lookup + + self.cache_file.close() + self.cache_file = open(self.cache_path, 'rb') self.cache_file.seek(0) self.cache = []