From 5660d6a67d5c758446f7bb192aad180f4c566073 Mon Sep 17 00:00:00 2001 From: Timothy Crosley Date: Sun, 10 Mar 2019 21:13:16 -0700 Subject: Fix issue 895 --- isort/isort.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/isort/isort.py b/isort/isort.py index 7d971b47..ac21230f 100644 --- a/isort/isort.py +++ b/isort/isort.py @@ -136,8 +136,12 @@ class SortImports(object): self.file_encoding, file_to_import_sort.encoding)) elif file_: - self.file_encoding = coding_check(file_) - file_.seek(0) + try: + file_.seek(0) + self.file_encoding = coding_check(file_) + file_.seek(0) + except io.UnsupportedOperation: + pass reader = codecs.getreader(self.file_encoding) file_contents = reader(file_).read() -- cgit v1.2.1 From 2408e2ec90d3ba0a4b239ddf901c4febb0800be3 Mon Sep 17 00:00:00 2001 From: Timothy Crosley Date: Sun, 10 Mar 2019 21:14:44 -0700 Subject: Update changelog --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index c3e3d567..66e88cc1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,8 @@ Changelog ========= +### 4.3.15 - March 10, 2019 - hot fix release +- Fixed a regression with handling streaming input from pipes (Issue #895) + ### 4.3.14 - March 9, 2019 - hot fix release - Fixed a regression with */directory/*.py style patterns -- cgit v1.2.1