fix newlines in peristent weather/remember

This commit is contained in:
Ryan Hitchman 2009-04-03 12:30:05 -06:00
parent e01d2b1d6b
commit ff37c5f7cb
2 changed files with 2 additions and 2 deletions

View File

@ -20,7 +20,7 @@ def load_memory(filename, mtimes={}):
mtime = os.stat(filename).st_mtime mtime = os.stat(filename).st_mtime
if mtimes.get(filename, 0) != mtime: if mtimes.get(filename, 0) != mtime:
mtimes[filename] = 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')) codecs.open(filename, 'r', 'utf-8'))
def save_memory(filename, memory): def save_memory(filename, memory):

View File

@ -20,7 +20,7 @@ def load_stalk(filename, mtimes={}):
mtime = os.stat(filename).st_mtime mtime = os.stat(filename).st_mtime
if mtimes.get(filename, 0) != mtime: if mtimes.get(filename, 0) != mtime:
mtimes[filename] = 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')) codecs.open(filename, 'r', 'utf-8'))
def save_stalk(filename, houses): def save_stalk(filename, houses):