Recreating wheels
This commit is contained in:
@@ -52,12 +52,7 @@ class FileCache(APICache):
|
||||
os.mkdir(self.path, 0o700)
|
||||
|
||||
def _getpath(self, key):
|
||||
path = os.path.join(self.path, str(hash(key)) + '.cache')
|
||||
if type(path) == str: # leave unicode ones alone
|
||||
try:
|
||||
path = path.decode('utf8')
|
||||
except UnicodeDecodeError:
|
||||
path = path.decode('windows-1252')
|
||||
path = config.parsePath(self.path, str(hash(key)) + '.cache')
|
||||
return path
|
||||
|
||||
def put(self, key, value):
|
||||
|
||||
@@ -44,12 +44,7 @@ class SettingsProvider():
|
||||
|
||||
s = self.settings.get(area)
|
||||
if s is None:
|
||||
p = os.path.join(self.BASE_PATH, area)
|
||||
if type(p) == str: # leave unicode ones alone
|
||||
try:
|
||||
p = p.decode('utf8')
|
||||
except UnicodeDecodeError:
|
||||
p = p.decode('windows-1252')
|
||||
p = config.parsePath(self.BASE_PATH, area)
|
||||
|
||||
if not os.path.exists(p):
|
||||
info = {}
|
||||
|
||||
Reference in New Issue
Block a user