diff options
-rw-r--r-- | CHANGELOG.md | 3 | ||||
-rw-r--r-- | isort/isort.py | 8 |
2 files changed, 9 insertions, 2 deletions
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 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() |