From 3c954668f26c3fd250eb0fdc7aba409c2ba27dbe Mon Sep 17 00:00:00 2001 From: Haroon Feisal Date: Thu, 6 Oct 2022 12:08:53 -0700 Subject: [PATCH] Write to stderr instead of stdout. --- src/containerapp/azext_containerapp/_clients.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/containerapp/azext_containerapp/_clients.py b/src/containerapp/azext_containerapp/_clients.py index fa7721661d2..73ce6a79896 100644 --- a/src/containerapp/azext_containerapp/_clients.py +++ b/src/containerapp/azext_containerapp/_clients.py @@ -26,16 +26,15 @@ def __init__(self): self.currTicker = 0 def tick(self): - sys.stdout.write('\r') - sys.stdout.write(self.tickers[self.currTicker] + " Running ..") - sys.stdout.flush() + sys.stderr.write('\r') + sys.stderr.write(self.tickers[self.currTicker] + " Running ..") + sys.stderr.flush() self.currTicker += 1 self.currTicker = self.currTicker % len(self.tickers) def flush(self): - sys.stdout.flush() - sys.stdout.write('\r') - sys.stdout.write("\033[K") + sys.stderr.flush() + sys.stderr.write("\r\033[K") def poll(cmd, request_url, poll_if_status): # pylint: disable=inconsistent-return-statements