Show More
@@ -449,8 +449,8 b' def mmapread(fp, size=None):' | |||
|
449 | 449 | return b'' |
|
450 | 450 | elif size is None: |
|
451 | 451 | size = 0 |
|
452 | fd = getattr(fp, 'fileno', lambda: fp)() | |
|
452 | 453 | try: |
|
453 | fd = getattr(fp, 'fileno', lambda: fp)() | |
|
454 | 454 | return mmap.mmap(fd, size, access=mmap.ACCESS_READ) |
|
455 | 455 | except ValueError: |
|
456 | 456 | # Empty files cannot be mmapped, but mmapread should still work. Check |
General Comments 0
You need to be logged in to leave comments.
Login now