diff options
-rwxr-xr-x | desktop-cronish | 9 | ||||
-rw-r--r-- | tests/timeout.stderr | 2 |
2 files changed, 6 insertions, 5 deletions
diff --git a/desktop-cronish b/desktop-cronish index 31dc563..0fd9676 100755 --- a/desktop-cronish +++ b/desktop-cronish @@ -42,6 +42,8 @@ class DesktopCronish(cliapp.Application): def process_args(self, args): self.ts = ttystatus.TerminalStatus(period=0.1) self.ts.format('%String(timestamp) %String(msg)') + if self.settings['quiet']: + self.ts.disable() self.jobs = {} self.previously = {} self.process_inputs(args) @@ -50,10 +52,9 @@ class DesktopCronish(cliapp.Application): def status(self, msg): logging.info(msg) - if not self.settings['quiet']: - self.ts['timestamp'] = time.strftime('%H:%M:%S') - self.ts['msg'] = msg - self.ts.flush() + self.ts['timestamp'] = time.strftime('%H:%M:%S') + self.ts['msg'] = msg + self.ts.flush() def process_input(self, filename): self.status('Loading jobs from %s' % filename) diff --git a/tests/timeout.stderr b/tests/timeout.stderr index a6741f6..acc9138 100644 --- a/tests/timeout.stderr +++ b/tests/timeout.stderr @@ -1 +1 @@ -ERROR: Job date: Command failed: timeout 1 sh -c sleep 1000 +ERROR: Job date: Command failed: sleep 1000 |