[Bug #1172763] dumbdbm uses eval() on lines, so it chokes if there's an extra \r on the end of a line; fixed by stripping off trailing whitespace.

This commit is contained in:
Andrew M. Kuchling 2005-06-07 19:36:10 +00:00
parent eb2608415e
commit ecdad8575e
2 changed files with 19 additions and 0 deletions

View file

@ -81,6 +81,7 @@ class _Database(UserDict.DictMixin):
pass
else:
for line in f:
line = line.rstrip()
key, pos_and_siz_pair = eval(line)
self._index[key] = pos_and_siz_pair
f.close()