From 46ef43f78231b059c671983775d4eed92ed0bad9 Mon Sep 17 00:00:00 2001 From: Pascal de Bruijn Date: Thu, 23 Jan 2020 14:15:27 +0100 Subject: [PATCH] outputting \r makes output unreadable in journald --- chkbit/main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chkbit/main.py b/chkbit/main.py index 0d1742e..d3dfdf2 100644 --- a/chkbit/main.py +++ b/chkbit/main.py @@ -39,7 +39,7 @@ class Main: self.total += 1 if self.verbose or not stat in [Stat.OK, Stat.SKIP]: print(stat.value, path) - if not self.quiet: + if not self.quiet and sys.stdout.isatty(): print(self.total, end="\r") def _parse_args(self):