mirror of
https://github.com/openSUSE/osc.git
synced 2024-12-25 09:26:14 +01:00
avoid buffering stdout output on pipes (bnc#930137)
https://bugzilla.opensuse.org/show_bug.cgi?id=930137
This commit is contained in:
parent
f8f4119b88
commit
22b272f3af
@ -5,6 +5,7 @@
|
||||
|
||||
import locale
|
||||
import sys
|
||||
import os
|
||||
|
||||
from osc import commandline, babysitter
|
||||
|
||||
@ -21,6 +22,10 @@ except NameError:
|
||||
#reload, neither setdefaultencoding are in python3
|
||||
pass
|
||||
|
||||
# avoid buffering output on pipes (bnc#930137)
|
||||
if sys.stdout.name == '<stdout>':
|
||||
sys.stdout = os.fdopen(sys.stdout.fileno(), 'w', 0)
|
||||
|
||||
osccli = commandline.Osc()
|
||||
|
||||
r = babysitter.run(osccli)
|
||||
|
Loading…
Reference in New Issue
Block a user