mirror of
https://github.com/openSUSE/osc.git
synced 2025-01-13 09:16: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 locale
|
||||||
import sys
|
import sys
|
||||||
|
import os
|
||||||
|
|
||||||
from osc import commandline, babysitter
|
from osc import commandline, babysitter
|
||||||
|
|
||||||
@ -21,6 +22,10 @@ except NameError:
|
|||||||
#reload, neither setdefaultencoding are in python3
|
#reload, neither setdefaultencoding are in python3
|
||||||
pass
|
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()
|
osccli = commandline.Osc()
|
||||||
|
|
||||||
r = babysitter.run(osccli)
|
r = babysitter.run(osccli)
|
||||||
|
Loading…
Reference in New Issue
Block a user