Commit a9f63438 authored by Vincent Pelletier's avatar Vincent Pelletier

Don't shadow open builtin.

Turns out, builtin works fine with shlex with python 3.
parent 2ece28d1
......@@ -82,7 +82,6 @@ if sys.version_info >= (3, 3):
bz2_open = bz2.open
_read_mode = 'rt'
else:
open = codecs.open
gzip_open = _wrapOpen(gzip_open)
bz2_open = _wrapOpen(bz2.BZ2File)
_read_mode = 'r'
......@@ -1371,7 +1370,7 @@ def main():
if state_file_name == '-':
state_file = sys.stdin
else:
state_file = open(state_file_name, encoding='ascii')
state_file = codecs.open(state_file_name, encoding='ascii')
with state_file:
load_start = time.time()
state = json.load(state_file)
......@@ -1423,7 +1422,7 @@ def main():
logfile.seek(0)
break
else:
logfile = open(filename, _read_mode, encoding=INPUT_ENCODING)
logfile = codecs.open(filename, _read_mode, encoding=INPUT_ENCODING)
lineno = 0
for lineno, line in enumerate(logfile, 1):
if show_progress and lineno % 5000 == 0:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment