Mercurial > hg-stable
changeset 33549:9a2ee9591acc
util: remove dead code which used to be for old python2 versions
Differential Revision: https://phab.mercurial-scm.org/D107
author | Alex Gaynor <agaynor@mozilla.com> |
---|---|
date | Mon, 17 Jul 2017 12:38:07 -0400 |
parents | 4cd4344a53c4 |
children | 32f348d741e5 |
files | mercurial/util.py |
diffstat | 1 files changed, 4 insertions(+), 10 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/util.py Sat Jun 17 20:10:22 2017 +0530 +++ b/mercurial/util.py Mon Jul 17 12:38:07 2017 -0400 @@ -295,16 +295,10 @@ try: buffer = buffer except NameError: - if not pycompat.ispy3: - def buffer(sliceable, offset=0, length=None): - if length is not None: - return sliceable[offset:offset + length] - return sliceable[offset:] - else: - def buffer(sliceable, offset=0, length=None): - if length is not None: - return memoryview(sliceable)[offset:offset + length] - return memoryview(sliceable)[offset:] + def buffer(sliceable, offset=0, length=None): + if length is not None: + return memoryview(sliceable)[offset:offset + length] + return memoryview(sliceable)[offset:] closefds = pycompat.osname == 'posix'