mirror of
https://github.com/python/cpython.git
synced 2025-07-23 03:05:38 +00:00
[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:
parent
eb2608415e
commit
ecdad8575e
2 changed files with 19 additions and 0 deletions
|
@ -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()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue