use codecs
This commit is contained in:
@@ -17,7 +17,7 @@
|
||||
from __future__ import print_function
|
||||
|
||||
import argparse
|
||||
import io
|
||||
import codecs
|
||||
import os
|
||||
import platform
|
||||
import sys
|
||||
@@ -177,7 +177,7 @@ def run(argv=None):
|
||||
for file in find_files_recursively(args.files, conf):
|
||||
filepath = file[2:] if file.startswith('./') else file
|
||||
try:
|
||||
with io.open(file, newline='') as f:
|
||||
with codecs.open(file) as f:
|
||||
problems = linter.run(f, conf, filepath)
|
||||
except EnvironmentError as e:
|
||||
print(e, file=sys.stderr)
|
||||
|
||||
Reference in New Issue
Block a user