summaryrefslogtreecommitdiffstats
path: root/Lib/dumbdbm.py
diff options
context:
space:
mode:
authorAndrew M. Kuchling <amk@amk.ca>2005-06-07 19:57:01 (GMT)
committerAndrew M. Kuchling <amk@amk.ca>2005-06-07 19:57:01 (GMT)
commit997b36271e50196cc59aee18a46cc8ccfb0f866a (patch)
treec26a50b93674d385172aa073c6c2e83a22016200 /Lib/dumbdbm.py
parent3c8f5ebc0cafe385552d9d89685b4c8d554898de (diff)
downloadcpython-997b36271e50196cc59aee18a46cc8ccfb0f866a.zip
cpython-997b36271e50196cc59aee18a46cc8ccfb0f866a.tar.gz
cpython-997b36271e50196cc59aee18a46cc8ccfb0f866a.tar.bz2
[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.
Diffstat (limited to 'Lib/dumbdbm.py')
-rw-r--r--Lib/dumbdbm.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/Lib/dumbdbm.py b/Lib/dumbdbm.py
index b85844d..84a7665 100644
--- a/Lib/dumbdbm.py
+++ b/Lib/dumbdbm.py
@@ -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()