diff options
author | Larry Hastings <larry@hastings.org> | 2014-05-18 04:05:10 (GMT) |
---|---|---|
committer | Larry Hastings <larry@hastings.org> | 2014-05-18 04:05:10 (GMT) |
commit | 3a260d228b32b04a88d947b887bf81759e8e5f10 (patch) | |
tree | e4a34e9cbbf877cf021ffba743ddbf54e17526b7 /Lib/fileinput.py | |
parent | 2110603344316d927e6d639275c12f5da78601d5 (diff) | |
parent | b1a1ec3151155a1ae65831793b4a5b7a87d9d09f (diff) | |
download | cpython-3a260d228b32b04a88d947b887bf81759e8e5f10.zip cpython-3a260d228b32b04a88d947b887bf81759e8e5f10.tar.gz cpython-3a260d228b32b04a88d947b887bf81759e8e5f10.tar.bz2 |
Merge.
Diffstat (limited to 'Lib/fileinput.py')
-rw-r--r-- | Lib/fileinput.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Lib/fileinput.py b/Lib/fileinput.py index de29518..87758ad 100644 --- a/Lib/fileinput.py +++ b/Lib/fileinput.py @@ -320,7 +320,10 @@ class FileInput: self._backupfilename = 0 if self._filename == '-': self._filename = '<stdin>' - self._file = sys.stdin + if 'b' in self._mode: + self._file = sys.stdin.buffer + else: + self._file = sys.stdin self._isstdin = True else: if self._inplace: |