Show More
@@ -295,16 +295,10 b' class digestchecker(object):' | |||||
295 | try: |
|
295 | try: | |
296 | buffer = buffer |
|
296 | buffer = buffer | |
297 | except NameError: |
|
297 | except NameError: | |
298 | if not pycompat.ispy3: |
|
298 | def buffer(sliceable, offset=0, length=None): | |
299 | def buffer(sliceable, offset=0, length=None): |
|
299 | if length is not None: | |
300 | if length is not None: |
|
300 | return memoryview(sliceable)[offset:offset + length] | |
301 |
|
|
301 | return memoryview(sliceable)[offset:] | |
302 | return sliceable[offset:] |
|
|||
303 | else: |
|
|||
304 | def buffer(sliceable, offset=0, length=None): |
|
|||
305 | if length is not None: |
|
|||
306 | return memoryview(sliceable)[offset:offset + length] |
|
|||
307 | return memoryview(sliceable)[offset:] |
|
|||
308 |
|
302 | |||
309 | closefds = pycompat.osname == 'posix' |
|
303 | closefds = pycompat.osname == 'posix' | |
310 |
|
304 |
General Comments 0
You need to be logged in to leave comments.
Login now