From b34ecb8ad30ceae4f4efa613e9587366a7d53bca Mon Sep 17 00:00:00 2001 From: pictuga Date: Sun, 5 May 2013 15:32:05 +0200 Subject: [PATCH] Fix cache crash with one entry with empty value --- morss.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/morss.py b/morss.py index 4b0b9ca..6a4536f 100644 --- a/morss.py +++ b/morss.py @@ -105,9 +105,9 @@ class Cache: self._cache = {} # new things to put in cache if not self._new: - data = open(self._file).read().strip().split("\n") + data = open(self._file).read().split("\n")[1:] for line in data: - key, bdata = line.split("\t") + key, bdata = line.split("\t", 1) self._cached[key] = bdata log(str(hash(self._key)))