From 3f36a085feeba6217f791d683021816fa513c01f Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Tue, 27 Apr 1999 12:21:17 +0000 Subject: [PATCH] Cast f.tell() result to int() in _addval(), so it works even on platforms where tell() returns a long. (Perhaps tell() should be fixed too?) Reported by Greg Humphreys. --- Lib/dumbdbm.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lib/dumbdbm.py b/Lib/dumbdbm.py index 0ae1e82fad4..200bc7feec2 100644 --- a/Lib/dumbdbm.py +++ b/Lib/dumbdbm.py @@ -79,7 +79,7 @@ def __getitem__(self, key): def _addval(self, val): f = _open(self._datfile, 'rb+') f.seek(0, 2) - pos = f.tell() + pos = int(f.tell()) ## Does not work under MW compiler ## pos = ((pos + _BLOCKSIZE - 1) / _BLOCKSIZE) * _BLOCKSIZE ## f.seek(pos)