diff --git a/plugins/remember.py b/plugins/remember.py index 5b30c29..0319a8d 100644 --- a/plugins/remember.py +++ b/plugins/remember.py @@ -20,7 +20,7 @@ def load_memory(filename, mtimes={}): mtime = os.stat(filename).st_mtime if mtimes.get(filename, 0) != mtime: mtimes[filename] = mtime - return dict((x.split(None, 1)[0].lower(), x) for x in + return dict((x.split(None, 1)[0].lower(), x.strip()) for x in codecs.open(filename, 'r', 'utf-8')) def save_memory(filename, memory): diff --git a/plugins/weather.py b/plugins/weather.py index bad60fb..2570934 100755 --- a/plugins/weather.py +++ b/plugins/weather.py @@ -20,7 +20,7 @@ def load_stalk(filename, mtimes={}): mtime = os.stat(filename).st_mtime if mtimes.get(filename, 0) != mtime: mtimes[filename] = mtime - return dict(x.split(None, 1) for x in + return dict(x.strip().split(None, 1) for x in codecs.open(filename, 'r', 'utf-8')) def save_stalk(filename, houses):