Mercurial > hg-stable
changeset 24070:de32e9881698
bundle2.unpackermixin: default value for seek() whence parameter
The contract for seek() includes seeking to an offset from the beginning of the
file when whence is omitted; put this implementation in compliance.
author | Eric Sumner <ericsumner@fb.com> |
---|---|
date | Thu, 05 Feb 2015 15:52:57 -0800 |
parents | c6666395fdd2 |
children | 184a2f6f40da |
files | mercurial/bundle2.py |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/bundle2.py Fri Feb 06 23:40:46 2015 +0100 +++ b/mercurial/bundle2.py Thu Feb 05 15:52:57 2015 -0800 @@ -497,7 +497,7 @@ """read exactly <size> bytes from the stream""" return changegroup.readexactly(self._fp, size) - def seek(self, offset, whence): + def seek(self, offset, whence=0): """move the underlying file pointer""" if self._seekable: return self._fp.seek(offset, whence)