[Pywikipedia-l] SVN: [5476] trunk/pywikipedia/diskcache.py
nicdumz at svn.wikimedia.org
nicdumz at svn.wikimedia.org
Fri May 30 13:43:11 UTC 2008
Revision: 5476
Author: nicdumz
Date: 2008-05-30 13:43:11 +0000 (Fri, 30 May 2008)
Log Message:
-----------
Fixing directory issues
Modified Paths:
--------------
trunk/pywikipedia/diskcache.py
Modified: trunk/pywikipedia/diskcache.py
===================================================================
--- trunk/pywikipedia/diskcache.py 2008-05-30 13:27:17 UTC (rev 5475)
+++ trunk/pywikipedia/diskcache.py 2008-05-30 13:43:11 UTC (rev 5476)
@@ -1,4 +1,5 @@
import random
+import config
import sys
import os
# http://mail.python.org/pipermail/python-list/2006-March/375280.html
@@ -16,7 +17,7 @@
def __init__(self, data, prefix = "", max_size = 10, cache_base = 'cache'):
self.max_size = max_size
while True:
- self.cache_path = os.path.join(cache_base, prefix + ''.join(
+ self.cache_path = config.datafilepath(cache_base, prefix + ''.join(
[random.choice('abcdefghijklmnopqrstuvwxyz')
for i in xrange(16)]))
if not os.path.exists(self.cache_path): break
More information about the Pywikipedia-l
mailing list