From aa255fd04883c009948e47508b4121ff1fb3e6f5 Mon Sep 17 00:00:00 2001 From: vg Date: Thu, 4 Apr 2024 17:28:37 +0200 Subject: modify fancy-sleep target display --- scripts/fancy_sleep.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'scripts') diff --git a/scripts/fancy_sleep.py b/scripts/fancy_sleep.py index 5839a32..a87b33c 100755 --- a/scripts/fancy_sleep.py +++ b/scripts/fancy_sleep.py @@ -20,6 +20,7 @@ Usage: fancy-sleep [options] TIME [--] [COMMAND...] Options: -h, --help Display this help message + --target Enable the display of the target time ''' @@ -227,8 +228,9 @@ def main(): print('ERROR: TIME is unparsable or equals to 0', file=sys.stderr) sys.exit(1) - print('Launched at:', curtime.strftime('%F %T')) - print('Run until:', target_time.strftime('%F %T')) + #print('Launched at:', curtime.strftime('%F %T')) + if args['--target']: + print('Run until:', target_time.strftime('%F %T')) sys.stdout.flush() try: -- cgit v1.2.3