Drop all mappings of config object into classes now that tests don't need that
This commit is contained in:
@@ -776,8 +776,8 @@ class Config:
|
||||
|
||||
class RecentProjects:
|
||||
|
||||
def __init__(self, mainConf):
|
||||
self.mainConf = mainConf
|
||||
def __init__(self, config):
|
||||
self._conf = config
|
||||
self._data = {}
|
||||
return
|
||||
|
||||
@@ -786,7 +786,7 @@ class RecentProjects:
|
||||
"""
|
||||
self._data = {}
|
||||
|
||||
cacheFile = self.mainConf.dataPath(nwFiles.RECENT_FILE)
|
||||
cacheFile = self._conf.dataPath(nwFiles.RECENT_FILE)
|
||||
if not cacheFile.is_file():
|
||||
return True
|
||||
|
||||
@@ -809,7 +809,7 @@ class RecentProjects:
|
||||
def saveCache(self):
|
||||
"""Save the cache dictionary of recent projects.
|
||||
"""
|
||||
cacheFile = self.mainConf.dataPath(nwFiles.RECENT_FILE)
|
||||
cacheFile = self._conf.dataPath(nwFiles.RECENT_FILE)
|
||||
cacheTemp = cacheFile.with_suffix(".tmp")
|
||||
try:
|
||||
with open(cacheTemp, mode="w+", encoding="utf-8") as outFile:
|
||||
|
||||
Reference in New Issue
Block a user