Skip to content

Commit ee6ca09

Browse files
committed
sys.stdout has always "buffer" attribute on python3
1 parent 21b4c5f commit ee6ca09

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

testinfra/plugin.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -150,11 +150,7 @@ def report(self):
150150
status = b"OK"
151151
ret = 0
152152

153-
if hasattr(sys.stdout, "buffer"):
154-
out = sys.stdout.buffer
155-
else:
156-
out = sys.stdout
157-
153+
out = sys.stdout.buffer
158154
out.write(
159155
(b"TESTINFRA %s - %d passed, %d failed, %d skipped in %.2f " b"seconds\n")
160156
% (

0 commit comments

Comments
 (0)