File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change 2
2
3
3
# This file is part of the Ingram Micro Cloud Blue Connect connect-cli.
4
4
# Copyright (c) 2019-2021 Ingram Micro. All Rights Reserved.
5
+ import io
6
+ import sys
7
+
5
8
import click
6
9
7
10
from connect .cli .core .base import cli
10
13
11
14
12
15
def main ():
16
+ _set_stdout_unbuffered ()
13
17
_ignore_openpyxl_warnings ()
14
18
try :
15
19
import uvloop
@@ -44,5 +48,10 @@ def _ignore_openpyxl_warnings():
44
48
warnings .filterwarnings ('ignore' , category = UserWarning , module = 'openpyxl.worksheet._reader' )
45
49
46
50
51
+ def _set_stdout_unbuffered (): # pragma: no cover
52
+ if 'pytest' not in sys .modules :
53
+ sys .stdout = io .TextIOWrapper (open (sys .stdout .fileno (), 'wb' , 0 ), write_through = True )
54
+
55
+
47
56
if __name__ == '__main__' :
48
57
main () # pragma: no cover
You can’t perform that action at this time.
0 commit comments