diff --git a/blocking.py b/blocking.py index 364fc068c..72ce46958 100644 --- a/blocking.py +++ b/blocking.py @@ -186,9 +186,12 @@ def updateBlockedCache(baseDir: str, return blockedCacheLastUpdated with open(globalBlockingFilename, 'r') as fpBlocked: blockedLines = fpBlocked.readlines() + # remove newlines + for index in range(len(blockedLines)): + blockedLines[index] = blockedLines[index].replace('\n', '') + # update the cache blockedCache.clear() - for line in blockedLines: - blockedCache.append(line.replace('\n', '')) + blockedCache += blockedLines return currTime