refactor morituri.common.directory to shed Directory() and bulk
This commit is contained in:
@@ -155,17 +155,9 @@ class PersistedCache(log.Loggable):
|
||||
class ResultCache(log.Loggable):
|
||||
|
||||
def __init__(self, path=None):
|
||||
if not path:
|
||||
path = self._getResultCachePath()
|
||||
|
||||
self._path = path
|
||||
self._path = path or directory.cache_path('result')
|
||||
self._pcache = PersistedCache(self._path)
|
||||
|
||||
def _getResultCachePath(self):
|
||||
d = directory.Directory()
|
||||
path = d.getCache('result')
|
||||
return path
|
||||
|
||||
def getRipResult(self, cddbdiscid, create=True):
|
||||
"""
|
||||
Retrieve the persistable RipResult either from our cache (from a
|
||||
@@ -208,8 +200,7 @@ class TableCache(log.Loggable):
|
||||
|
||||
def __init__(self, path=None):
|
||||
if not path:
|
||||
d = directory.Directory()
|
||||
self._path = d.getCache('table')
|
||||
self._path = directory.cache_path('table')
|
||||
else:
|
||||
self._path = path
|
||||
|
||||
|
||||
Reference in New Issue
Block a user