1
0
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:
Bernhard M. Wiedemann 2015-05-10 20:58:35 +02:00
parent f8f4119b88
commit 22b272f3af

View File

@ -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)