Default to UTF-8 encoding in open() calls

This commit is contained in:
Anthony Sottile 2017-04-19 08:11:57 -07:00
parent 1be4e4f82e
commit e272c219fd
8 changed files with 26 additions and 18 deletions

View file

@ -1,7 +1,6 @@
from __future__ import absolute_import
from __future__ import unicode_literals
import io
import os.path
import shlex
import string
@ -41,7 +40,7 @@ def parse_filename(filename):
if not os.path.exists(filename) or not os.access(filename, os.X_OK):
return ()
with io.open(filename, 'rb') as f:
with open(filename, 'rb') as f:
return parse_bytesio(f)