Recreating wheels

This commit is contained in:
Ebag333
2016-12-19 00:11:55 -08:00
parent d4b6099d6e
commit bef17e53c6
5 changed files with 29 additions and 54 deletions

View File

@@ -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):

View File

@@ -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 = {}