Use file's built-in readlines() to split file
parent
bbf5c92ba2
commit
89354e1528
4
morss.py
4
morss.py
|
@ -117,8 +117,8 @@ class Cache:
|
|||
self._cached = {} # what *was* cached
|
||||
self._cache = {} # new things to put in cache
|
||||
|
||||
if os.path.exists(self._file):
|
||||
data = open(self._file).read().split("\n")
|
||||
if os.path.isfile(self._file):
|
||||
data = open(self._file).readlines()
|
||||
for line in data:
|
||||
if "\t" in line:
|
||||
key, bdata = line.split("\t", 1)
|
||||
|
|
Loading…
Reference in New Issue