2
0
mirror of https://github.com/xcat2/confluent.git synced 2024-11-28 20:39:40 +00:00

Aggressively flush out error output

This commit is contained in:
Jarrod Johnson 2022-02-24 15:46:38 -05:00
parent d7df1e7891
commit 15f4cc085d

View File

@ -223,6 +223,7 @@ class HTTPSClient(client.HTTPConnection, object):
self.errout = None
if errout:
self.errout = open(errout, 'w')
self.errout.flush()
self.stdheaders = {}
mgtiface = None
if usejson:
@ -340,6 +341,7 @@ class HTTPSClient(client.HTTPConnection, object):
sys.stderr.write(errmsg)
if self.errout:
self.errout.write(errmsg)
self.errout.flush()
sys.exit(1)
def grab_url(self, url, data=None, returnrsp=False):