1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2026-02-03 23:41:51 +00:00

time-command.py: make sure seconds is an int (#11421)

Make sure seconds is an int.
This commit is contained in:
Felix Fontein 2026-01-20 22:08:15 +01:00 committed by GitHub
parent 4b67afc2b0
commit 9611dc258a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -19,7 +19,7 @@ def main():
sys.stdout.reconfigure(errors="surrogateescape")
for line in sys.stdin:
seconds = time.time() - start
seconds = int(time.time() - start)
sys.stdout.write(f"{seconds // 60:02}:{seconds % 60:02} {line}")
sys.stdout.flush()