Rename io.open import to limite side-effects
This commit is contained in:
@@ -16,7 +16,7 @@
|
||||
import argparse
|
||||
import errno
|
||||
import os
|
||||
from io import open
|
||||
from io import open as io_open
|
||||
from textwrap import dedent
|
||||
|
||||
from six import integer_types
|
||||
@@ -132,7 +132,7 @@ class Config(object):
|
||||
@classmethod
|
||||
def read_file(cls, file_path, config_name):
|
||||
cls.check_file(file_path, config_name)
|
||||
with open(file_path, encoding="utf-8") as file_stream:
|
||||
with io_open(file_path, encoding="utf-8") as file_stream:
|
||||
return file_stream.read()
|
||||
|
||||
@staticmethod
|
||||
|
||||
Reference in New Issue
Block a user