]> granicus.if.org Git - python/commitdiff
Apply rstrip() to the lines read from _dirfile in _update(), so that a
authorGuido van Rossum <guido@python.org>
Mon, 11 Dec 2000 20:33:52 +0000 (20:33 +0000)
committerGuido van Rossum <guido@python.org>
Mon, 11 Dec 2000 20:33:52 +0000 (20:33 +0000)
dumbdbm archive created on Windows can be read on Unix.

Lib/dumbdbm.py

index 0ce901fca50bd19f3705d2da935d8c6da0014278..9ed05d63739e3b1d772000c03a6dd6b6dfa82cbb 100644 (file)
@@ -52,7 +52,7 @@ class _Database:
                        pass
                else:
                        while 1:
-                               line = f.readline()
+                               line = f.readline().rstrip()
                                if not line: break
                                key, (pos, siz) = eval(line)
                                self._index[key] = (pos, siz)