summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTimothy Edmund Crosley <timothy.crosley@gmail.com>2019-03-08 01:04:06 -0800
committerGitHub <noreply@github.com>2019-03-08 01:04:06 -0800
commit9377ab2bc1df8a25e291f676718aabec44c3009e (patch)
treeeaef486e9e61c9e77a940a8a2556fb0218284b24
parent2403ccfe80445e31d0d9d4f3d6f850dcce8fc8ed (diff)
downloadisort-9377ab2bc1df8a25e291f676718aabec44c3009e.tar.gz
Update isort.py
-rw-r--r--isort/isort.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/isort/isort.py b/isort/isort.py
index 9fd4b639..4cef6e12 100644
--- a/isort/isort.py
+++ b/isort/isort.py
@@ -109,8 +109,8 @@ class SortImports(object):
" or matches a glob in 'skip_glob' setting".format(file_path))
file_contents = None
if not self.skipped and not file_contents:
- with io.open(file_path, 'rb') as f:
- file_encoding = coding_check(f)
+ with io.open(file_path, 'rb') as f:
+ file_encoding = coding_check(f)
with io.open(file_path, encoding=file_encoding, newline='') as file_to_import_sort:
try:
file_contents = file_to_import_sort.read()