diff options
author | Guido van Rossum <guido@python.org> | 1999-04-27 12:21:17 +0000 |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1999-04-27 12:21:17 +0000 |
commit | 82303cad8aa64fb745de7ecae94f80ab299b82e4 (patch) | |
tree | 049d7c8941adb7f5ed9b2e626d531aa4e1ff5137 /Lib/dumbdbm.py | |
parent | 8e3817f0552fa6e74621186467562dc226fb337b (diff) | |
download | cpython-82303cad8aa64fb745de7ecae94f80ab299b82e4.tar.gz |
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.
Diffstat (limited to 'Lib/dumbdbm.py')
-rw-r--r-- | Lib/dumbdbm.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/dumbdbm.py b/Lib/dumbdbm.py index 0ae1e82fad..200bc7feec 100644 --- a/Lib/dumbdbm.py +++ b/Lib/dumbdbm.py @@ -79,7 +79,7 @@ class _Database: 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) |