diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-18 05:52:35 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-18 05:52:35 +0000 |
commit | 7fec0b69a082aaeec72fee0612766aa42f6b1b4d (patch) | |
tree | efb569b86ca4da888717f5433e757145fa322e08 /ansible_collections/hetzner/hcloud/.azure-pipelines/scripts/time-command.py | |
parent | Releasing progress-linux version 7.7.0+dfsg-3~progress7.99u1. (diff) | |
download | ansible-7fec0b69a082aaeec72fee0612766aa42f6b1b4d.tar.xz ansible-7fec0b69a082aaeec72fee0612766aa42f6b1b4d.zip |
Merging upstream version 9.4.0+dfsg.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'ansible_collections/hetzner/hcloud/.azure-pipelines/scripts/time-command.py')
-rwxr-xr-x | ansible_collections/hetzner/hcloud/.azure-pipelines/scripts/time-command.py | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/ansible_collections/hetzner/hcloud/.azure-pipelines/scripts/time-command.py b/ansible_collections/hetzner/hcloud/.azure-pipelines/scripts/time-command.py index 5e8eb8d4c..783e745d8 100755 --- a/ansible_collections/hetzner/hcloud/.azure-pipelines/scripts/time-command.py +++ b/ansible_collections/hetzner/hcloud/.azure-pipelines/scripts/time-command.py @@ -1,8 +1,7 @@ #!/usr/bin/env python """Prepends a relative timestamp to each input line from stdin and writes it to stdout.""" -from __future__ import (absolute_import, division, print_function) -__metaclass__ = type +from __future__ import annotations import sys import time @@ -12,14 +11,14 @@ def main(): """Main program entry point.""" start = time.time() - sys.stdin.reconfigure(errors='surrogateescape') - sys.stdout.reconfigure(errors='surrogateescape') + sys.stdin.reconfigure(errors="surrogateescape") + sys.stdout.reconfigure(errors="surrogateescape") for line in sys.stdin: seconds = time.time() - start - sys.stdout.write('%02d:%02d %s' % (seconds // 60, seconds % 60, line)) + sys.stdout.write("%02d:%02d %s" % (seconds // 60, seconds % 60, line)) sys.stdout.flush() -if __name__ == '__main__': +if __name__ == "__main__": main() |