Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Remove compatibilty for Python 2
  • Loading branch information
hugovk committed Dec 12, 2022
commit 1ee3e500b54f2b282bbe7f28827b959b4a0c7cb3
3 changes: 1 addition & 2 deletions Tools/iobench/iobench.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,9 @@ def text_open(fn, mode, encoding=None):
try:
return open(fn, mode, encoding=encoding or TEXT_ENCODING)
except TypeError:
if 'r' in mode:
mode += 'U' # 'U' mode is needed only in Python 2.x
return open(fn, mode)


def get_file_sizes():
for s in ['20 KiB', '400 KiB', '10 MiB']:
size, unit = s.split()
Expand Down