Use file's built-in readlines() to split file

master
pictuga 2013-06-08 17:30:53 +02:00
parent bbf5c92ba2
commit 89354e1528
1 changed files with 2 additions and 2 deletions

View File

@ -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)