mirror of https://gitlab.com/bashrc2/epicyon
Simpler update of blocking cache
parent
7d6b6d95fb
commit
7c9fc8dfbb
|
@ -186,9 +186,12 @@ def updateBlockedCache(baseDir: str,
|
||||||
return blockedCacheLastUpdated
|
return blockedCacheLastUpdated
|
||||||
with open(globalBlockingFilename, 'r') as fpBlocked:
|
with open(globalBlockingFilename, 'r') as fpBlocked:
|
||||||
blockedLines = fpBlocked.readlines()
|
blockedLines = fpBlocked.readlines()
|
||||||
|
# remove newlines
|
||||||
|
for index in range(len(blockedLines)):
|
||||||
|
blockedLines[index] = blockedLines[index].replace('\n', '')
|
||||||
|
# update the cache
|
||||||
blockedCache.clear()
|
blockedCache.clear()
|
||||||
for line in blockedLines:
|
blockedCache += blockedLines
|
||||||
blockedCache.append(line.replace('\n', ''))
|
|
||||||
return currTime
|
return currTime
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue