Initial pass on python 3 port

Given the imminent end-of-life for Python 2, I didn't bother making the
codebase compatible with both.

Signed-off-by: Drew DeVault <sir@cmpwn.com>
This commit is contained in:
Drew DeVault
2019-08-10 11:45:17 +09:00
committed by JoeLametta
parent f740a0ef0d
commit 64dd9d843a
33 changed files with 274 additions and 317 deletions

View File

@@ -124,11 +124,7 @@ class PersistedCache:
def __init__(self, path):
self.path = path
try:
os.makedirs(self.path)
except OSError as e:
if e.errno != os.errno.EEXIST: # FIXME: errno 17 is 'File Exists'
raise
os.makedirs(self.path, exist_ok=True)
def _getPath(self, key):
return os.path.join(self.path, '%s.pickle' % key)