Skip to content

Commit 1ee3e50

Browse files
committed
Remove compatibilty for Python 2
1 parent e1dadc2 commit 1ee3e50

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

Tools/iobench/iobench.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,9 @@ def text_open(fn, mode, encoding=None):
1616
try:
1717
return open(fn, mode, encoding=encoding or TEXT_ENCODING)
1818
except TypeError:
19-
if 'r' in mode:
20-
mode += 'U' # 'U' mode is needed only in Python 2.x
2119
return open(fn, mode)
2220

21+
2322
def get_file_sizes():
2423
for s in ['20 KiB', '400 KiB', '10 MiB']:
2524
size, unit = s.split()

0 commit comments

Comments
 (0)