From 15f4cc085d071469b0d3152036921fda6d190661 Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Thu, 24 Feb 2022 15:46:38 -0500 Subject: [PATCH] Aggressively flush out error output --- confluent_osdeploy/common/initramfs/opt/confluent/bin/apiclient | 2 ++ 1 file changed, 2 insertions(+) diff --git a/confluent_osdeploy/common/initramfs/opt/confluent/bin/apiclient b/confluent_osdeploy/common/initramfs/opt/confluent/bin/apiclient index 836c44ed..f808ff0b 100644 --- a/confluent_osdeploy/common/initramfs/opt/confluent/bin/apiclient +++ b/confluent_osdeploy/common/initramfs/opt/confluent/bin/apiclient @@ -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):